All access to Fmod is made through this abstraction layer.
The abstraction layer hides most Fmod references and data types by using sound names.
All games inherit from FmodScene
through TeetairApplication
, therefore they automatically have access to the following methods.
ENUM playmode
shot
loop
addSound(const string name, const string file)
name
: The name.file
: The sound file.true
if the sound was successfully loadedplaySound(const string name, float volume = 1, playmode mode = shot, int *channelId = NULL)
name
: The name.volume
: The volume.mode
: The mode.channelId
: [out] The channel identifier selected by fmod.true
if the sound exists and is played successfullypauseSound(int channelId)
channelId
: The channel identifier returned by playSound.true
if the channel was in use and was successfully pausedunpauseSound(int channelId)
channelId
: The channel identifier returned by playSound.true
if the channel was in use and was successfully continuedstopSound(int channelId)
channelId
: The channel identifier returned by playSound.true
if the channel was in use and was successfully stopped