SLUDGE

startMusic


Syntax:

startMusic (musicFile, channel, startPos);

Purpose:

Starts playing a piece of music at the volume set by the setDefaultMusicVolume function. The musicFile parameter must be a file handle - the channel parameter must be a number from 0 to 3 inclusive. Only one piece of music can be played on each channel at once.

The startPos defines where in a track-based music file to begin playback. This allows you to start the same piece of music in different places dependant on the game situation... or to store more than one piece of music in the same file.

File formats supported by this function are .MOD, .XM, .S3M and .IT files. This function cannot play .WAV or .OGG files - to start playback of one of these, you must use either the playSound or loopSound function.

Return value:

No return value.

See also:

Using Audio in SLUDGE

setMusicVolume

stopMusic