#include <JSoundSystem.h>
Public Member Functions | |
JMusic * | LoadMusic (const char *fileName) |
void | PlayMusic (JMusic *music, bool looping=false) |
void | StopMusic (JMusic *music) |
void | ResumeMusic (JMusic *music) |
JSample * | LoadSample (const char *fileName) |
void | PlaySample (JSample *sample) |
void | SetVolume (int volume) |
Static Public Member Functions | |
static JSoundSystem * | GetInstance () |
static JSoundSystem* JSoundSystem::GetInstance | ( | ) | [static] |
Get the singleton instance
JMusic* JSoundSystem::LoadMusic | ( | const char * | fileName | ) |
Load music.
filename | - Name of the music file. |
void JSoundSystem::PlayMusic | ( | JMusic * | music, | |
bool | looping = false | |||
) |
Delete music from memory.
music | - Music to be deleted. Play music. | |
music | - Music to be played. | |
looping | - Play the music in a loop. |
void JSoundSystem::StopMusic | ( | JMusic * | music | ) |
Stop playing.
music | - Music to be stopped. |
void JSoundSystem::ResumeMusic | ( | JMusic * | music | ) |
Resume playing.
music | - Music to be resumed. |
JSample* JSoundSystem::LoadSample | ( | const char * | fileName | ) |
Load sound effect.
fileName | - Sound effect for loading. |
void JSoundSystem::PlaySample | ( | JSample * | sample | ) |
Delete sound effect from memory.
sample | - Sound to be deleted. Play sound effect. | |
sample | - Sound for playing. |
void JSoundSystem::SetVolume | ( | int | volume | ) |
Set volume for audio playback.
volume | - New volume. |