v2025.6.2
All Bundles

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 : 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 : GetVolumeMusic() ~ Int

Halt

Halts music

function : 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 : Pause() ~ Nil

Paused

Pauses music

function : 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 : Playing() ~ Bool

Return

TypeDescription
Booltrue on success, false otherwise

Resume

Resumes music

function : Resume() ~ Nil

VolumeMusic

Sets music volume

function : VolumeMusic(volume:Int) ~ Int

Parameters

NameTypeDescription
volumeIntvolume between 0 - 128

Return

TypeDescription
Intset volume