YourGameLib
|
audio playback related functions More...
Functions | |
int | init (int numSources, int numChannels=0, int sampleRate=0) |
initialize audio | |
void | shutdown () |
shutdown audio | |
bool | isInitialized () |
check if audio initialized | |
int | storeFile (const std::string &filename) |
load and store audio file | |
int | play (const std::string &filename, bool loop=false) |
play audio file, that was previously loaded via storeFile() | |
int | stop (int sourceId) |
stop audio source | |
int | pause (int sourceId, bool pause) |
pause/unpause audio source | |
int | setChannelGains (int sourceId, const std::vector< float > &gains) |
set gain per channel of an audio source | |
audio playback related functions
int yourgame::audio::init | ( | int | numSources, |
int | numChannels = 0 , |
||
int | sampleRate = 0 |
||
) |
initialize audio
bool yourgame::audio::isInitialized | ( | ) |
check if audio initialized
int yourgame::audio::pause | ( | int | sourceId, |
bool | pause | ||
) |
pause/unpause audio source
sourceId | audio source id |
pause | true: pause, false: unpause |
int yourgame::audio::play | ( | const std::string & | filename, |
bool | loop = false |
||
) |
play audio file, that was previously loaded via storeFile()
filename | |
loop |
int yourgame::audio::setChannelGains | ( | int | sourceId, |
const std::vector< float > & | gains | ||
) |
set gain per channel of an audio source
sourceId | audio source id |
gains | gain [0.0 .. 1.0] per channel |
void yourgame::audio::shutdown | ( | ) |
shutdown audio
int yourgame::audio::stop | ( | int | sourceId | ) |
stop audio source
sourceId | audio source id |
int yourgame::audio::storeFile | ( | const std::string & | filename | ) |
load and store audio file