Designing Games with GameMaker
CD music
This functionality is only available in the Standard Edition of GameMaker.There are also a number of functions dealing with playing music from a CD.
cd_init() Must be called before using the other functions. Should also be called when a CD is changed (or simply from time to time).
cd_present() Returns whether a CD is present in the default CD drive.
cd_number() Returns the number of tracks on the CD.
cd_playing() Returns whether the CD is playing.
cd_paused() Returns whether the CD is paused or stopped.
cd_track() Returns the number of the current track (1=the first).
cd_length() Returns the length of the total CD in milliseconds.
cd_track_length(n) Returns the length of track n of the CD in milliseconds.
cd_position() Returns the current position on the CD in milliseconds.
cd_track_position() Returns the current position in the track being played in milliseconds.
cd_play(first,last) Tells the CD to play tracks first until last. If you want to play the full CD give 1 and 1000 as arguments.
cd_stop() Stops playing.
cd_pause() Pauses the playing.
cd_resume() Resumes the playing.
cd_set_position(pos) Sets the position on the CD in milliseconds.
cd_set_track_position(pos) Sets the position in the current track in milliseconds.
cd_open_door() Opens the door of the CD player.
cd_close_door() Closes the door of the CD player.
There is one very general function to access the multimedia functionality of windows.
MCI_command(str) This functions sends the command string to the Windows multimedia system using the Media Control Interface (MCI). It returns the return string. You can use this to control all sorts of multimedia devices. See the Windows documentation for information in how to use this command. For example MCI_command('play cdaudio from 1') plays a CD (after you have correctly initialized it using other commands). This function is only for advanced use!
Alternative versions
You can also read this manual on one single long page (± 1.5 mb)
Also available in:
Download helpfile
Also available in:
Download helpfile