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
Summary:
The two different modes that specify how a sound is played
shot
Summary:
Play the sound only once
loop
Summary:
Repeat the sound infinitely
addSound(const string name, const string file)
Summary:
Loads the sound file and makes it available under the given name.
Params:
name: The name.
file: The sound file.
Returns:
true if the sound was successfully loaded
playSound(const string name, float volume = 1, playmode mode = shot, int *channelId = NULL)
Summary:
Plays the sound with the given name.
Params:
name: The name.
volume: The volume.
mode: The mode.
channelId: [out] The channel identifier selected by fmod.
Returns:
true if the sound exists and is played successfully
pauseSound(int channelId)
Summary:
Pauses the sound.
Params:
channelId: The channel identifier returned by playSound.
Returns:
true if the channel was in use and was successfully paused
unpauseSound(int channelId)
Summary:
Unpauses the sound.
Params:
channelId: The channel identifier returned by playSound.
Returns:
true if the channel was in use and was successfully continued
stopSound(int channelId)
Summary:
Stops the sound and deletes the channel. The channelId handle will be invalid after this call.
Params:
channelId: The channel identifier returned by playSound.
Returns:
true if the channel was in use and was successfully stopped