|
MochiEngine
|
Interface for audio management, including loading and unloading audio, playing it, changing volume and other parameters. More...
#include <IAudioManager.h>
Public Member Functions | |
| virtual void | Update (const float &dt)=0 |
| Update internal audio subsystems. | |
| virtual void | LoadAudio (const std::string &path)=0 |
| Preloads an audio file. | |
| virtual void | UnloadAudio (const std::string &path)=0 |
| Unloads a loaded audio. | |
| virtual void | PlayBGM (const std::string &audioName)=0 |
| Plays an audio as BGM. | |
| virtual void | PauseBGM ()=0 |
| Pauses current playing BGM (can resume at the same point). | |
| virtual void | StopBGM ()=0 |
| Stops current playing BGM (can't resume). | |
| virtual void | ResumeBGM ()=0 |
| Resume current playing BGM. | |
| virtual void | SkipToTimelinePosition (const int &ms)=0 |
| Skip current playing BGM to a certain position. | |
| virtual void | PlayOneShot (const std::string &audioName)=0 |
| Plays an audio once and then stops it. | |
| virtual void | SetParameter (const std::string ¶meterName, const float &value)=0 |
| Sets a parameter used by the audio system. This can vary between implementations. Check specific implementations of this class to check what you can do with this. | |
| virtual void | SetMixerVolume (const std::string &mixerGroupName, const float &value)=0 |
| Changes the volume of a specific mixer/group. | |
Interface for audio management, including loading and unloading audio, playing it, changing volume and other parameters.
The implementations are meant to wrap some existing audio system to be used the same within the engine.
|
pure virtual |
Preloads an audio file.
| path | The path to the file in the catalog |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Pauses current playing BGM (can resume at the same point).
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Plays an audio as BGM.
| audioName | Identifier of the audio |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Plays an audio once and then stops it.
| audioName | Identifier of the audio |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Resume current playing BGM.
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Changes the volume of a specific mixer/group.
| mixerGroupName | The name of the mixer/group. |
| value | The new volume (between 0 and 1) |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Sets a parameter used by the audio system. This can vary between implementations. Check specific implementations of this class to check what you can do with this.
| parameterName | The name or identifier of the parameter. |
| value | The value of the parameter. |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Skip current playing BGM to a certain position.
| ms | Point of the song in milliseconds |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Stops current playing BGM (can't resume).
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Unloads a loaded audio.
| path | The path to the file in the catalog |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.
|
pure virtual |
Update internal audio subsystems.
| dt | Delta time |
Implemented in Mochi::Audio::DummyAudioManager, Mochi::Audio::FMODWrapper, and Mochi::Audio::SDLAudio.