List of all members.
Detailed Description
SDL Mixer.
Implements all Mixer functions with the SDL API.
- Warning:
- Ensure that the mixer is not playing any audio resources before clearing them. Not doing so results in crashes.
Constructor & Destructor Documentation
| SDL_Mixer::~SDL_Mixer |
( |
|
) |
|
| SDL_Mixer::SDL_Mixer |
( |
const SDL_Mixer & |
|
) |
[private] |
Member Function Documentation
| void SDL_Mixer::init |
( |
|
) |
[private] |
| void SDL_Mixer::musicFadeIn |
( |
int |
loops = -1, |
|
|
int |
miliseconds = 400 | |
|
) |
| | |
Plays music track with fade in beginning.
- Parameters:
-
| music | Music to fade. |
| loops | Number of loops to play track. Defaults to loop forever. |
| miliseconds | Time of fade in. Defaults to 4 seconds. |
| void SDL_Mixer::musicFadeOut |
( |
int |
miliseconds = 400 |
) |
|
Plays music track with fade out at the end.
- Parameters:
-
| miliseconds | Time to fade out. Defaults to 400. |
| void SDL_Mixer::pauseMusic |
( |
|
) |
[virtual] |
Pauses music.
Reimplemented from Mixer.
| void SDL_Mixer::pauseSound |
( |
|
) |
[virtual] |
Pauses all sound channels.
Reimplemented from Mixer.
| void SDL_Mixer::playMusic |
( |
Music * |
music |
) |
[virtual] |
Plays a music resource from memory.
Mix_PlayMusic(music, loops);
- Parameters:
-
| music | Music resource to play. |
| loops | Number of times to play the sound (1 + loops). |
Reimplemented from Mixer.
| void SDL_Mixer::playSound |
( |
Sound * |
sound |
) |
[virtual] |
Plays a sound resource from memory.
Mix_PlayChannel(channel, sound, loops);
- Parameters:
-
| channel | Channel to play, specify -1 to automatically assign a channel. |
| sound | Sound resource to play. |
| loops | Number of times to play the sound (1 + loops). |
Reimplemented from Mixer.
| void SDL_Mixer::setMusVolume |
( |
int |
level |
) |
|
| void SDL_Mixer::setSfxVolume |
( |
int |
level |
) |
|
| void SDL_Mixer::stopAllAudio |
( |
|
) |
[virtual] |
Stops all audio globally (including all sound channels and music)
Reimplemented from Mixer.
| void SDL_Mixer::stopMusic |
( |
|
) |
[virtual] |
Stops music.
Reimplemented from Mixer.
| void SDL_Mixer::stopSound |
( |
|
) |
[virtual] |
Stops all sound channels.
Reimplemented from Mixer.
| void SDL_Mixer::toggleMute |
( |
|
) |
|
Member Data Documentation
Act as a NULL mixer in the event of an audio failure.
Flag indicating that the mixer is in a muted state.
The documentation for this class was generated from the following files: