Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.
MixMusic
Music operations
Operations
FadeInMusic #
Fades in music
method : public : FadeInMusic(loops:Int, ms:Int) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| loops | Int | number of loops to play or -1 for infinite |
| ms | Int | millisecond delay |
Return
| Type | Description |
|---|---|
| Int | channel music is playing on |
FadeOutMusic # function
Fades out music
function : FadeOutMusic(ms:Int) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| ms | Int | millisecond delay |
Return
| Type | Description |
|---|---|
| Int | number of channels fading out |
IsNull #
Determines if the underlying SDL C-struct is NULL
method : public : IsNull() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true if NULL, false otherwise |
Paused # function
Pauses music
function : Paused() ~ BoolReturn
| Type | Description |
|---|---|
| Bool | true on success, false otherwise |
PlayMusic #
Plays music
method : public : PlayMusic(loops:Int) ~ IntParameters
| Name | Type | Description |
|---|---|---|
| loops | Int | number of loops to play or -1 for infinite |
Return
| Type | Description |
|---|---|
| Int | channel music is playing on |