5 #ifndef __RD_AUDIO_MANAGER_HPP__
6 #define __RD_AUDIO_MANAGER_HPP__
58 virtual bool start() = 0;
61 virtual bool stop() = 0;
68 virtual bool configure(
const std::string & parameter,
const std::string & value);
80 virtual bool load(
const std::string& music_filepath,
const std::string&
id,
const int& type) = 0;
88 virtual bool play(
const std::string&
id,
int loop = 1) = 0;
123 #endif //-- __RD_AUDIO_MANAGER_HPP__
Music and sound effects manager.
Definition: AudioManager.hpp:28
static const int MUSIC
Identifier for music tracks.
Definition: AudioManager.hpp:97
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
virtual bool start()=0
Start the AudioManager.
virtual bool configure(const std::string ¶meter, const std::string &value)
Configures a parameter with a value.
Definition: AudioManager.cpp:98
virtual bool load(const std::string &music_filepath, const std::string &id, const int &type)=0
Loads an audio file, assigning it a string as identifier.
virtual bool play(const std::string &id, int loop=1)=0
Plays a music/sound effect file previously loaded.
static std::map< std::string, AudioManager * > audioManagerRegistry
Stores all the AudioManager that have been registered.
Definition: AudioManager.hpp:117
static std::string currentId
Stores the id of the current unique instance used.
Definition: AudioManager.hpp:114
virtual bool stop()=0
Stops the AudioManager.
virtual bool isStopped() const =0
True if the manager is not active.
virtual bool stopMusic()=0
Stops the music being played currently.
static AudioManager * getAudioManager()
Get a reference to the AudioManager.
Definition: AudioManager.cpp:20
static AudioManager * audioManagerInstance
Stores the unique instance of the AudioManager.
Definition: AudioManager.hpp:111
static const int FX
Identifier for sound effect tracks.
Definition: AudioManager.hpp:99
static bool destroyAudioManager()
Deallocate all the registered AudioManager.
Definition: AudioManager.cpp:57
static bool Register(AudioManager *manager, const std::string &id)
This function allows subclasses to install their unique instances in the singleton register to be sel...
Definition: AudioManager.cpp:103