YourGameLib
Loading...
Searching...
No Matches
Namespaces | Functions
audio.h File Reference
#include <string>
#include <vector>
Include dependency graph for audio.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  yourgame
 
namespace  yourgame::audio
 audio playback related functions
 

Functions

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