Home

MixMusic

Music operations

Operations

FadeInMusic

Fades in music

method : public : FadeInMusic(loops:Int, ms:Int) ~ Int
Parameters
NameTypeDescription
loopsIntnumber of loops to play or -1 for infinite
msIntmillisecond delay

Return
TypeDescription
Intchannel music is playing on

FadeOutMusic

Fades out music

function : public : FadeOutMusic(ms:Int) ~ Int
Parameters
NameTypeDescription
msIntmillisecond delay

Return
TypeDescription
Intnumber of channels fading out

Free

Free the memory used in chunk, and free chunk itself as well.

method : public : Free() ~ Nil

GetVolumeMusic

Gets music volume between 0 - 128

function : public : GetVolumeMusic() ~ Int

Halt

Halts music

function : public : Halt() ~ Nil

IsNull

Determines if the underlying SDL C-struct is NULL

method : public : IsNull() ~ Bool
Return
TypeDescription
Booltrue if NULL, false otherwise

Pause

Pauses music

function : public : Pause() ~ Nil

Paused

Pauses music

function : public : Paused() ~ Bool
Return
TypeDescription
Booltrue on success, false otherwise

PlayMusic

Plays music

method : public : PlayMusic(loops:Int) ~ Int
Parameters
NameTypeDescription
loopsIntnumber of loops to play or -1 for infinite

Return
TypeDescription
Intchannel music is playing on

Playing

Plays music

function : public : Playing() ~ Bool
Return
TypeDescription
Booltrue on success, false otherwise

Resume

Resumes music

function : public : Resume() ~ Nil

VolumeMusic

Sets music volume

function : public : VolumeMusic(volume:Int) ~ Int
Parameters
NameTypeDescription
volumeIntvolume between 0 - 128

Return
TypeDescription
Intset volume