29#include <unordered_map>
44 std::unordered_map<unsigned int, std::shared_ptr<PlaybackCategory>> m_categories;
49 std::shared_ptr<IDevice> m_device;
54 unsigned int m_currentKey;
72 unsigned int addCategory(std::shared_ptr<PlaybackCategory> category);
87 std::shared_ptr<IHandle>
play(std::shared_ptr<ISound> sound,
unsigned int catKey);
131 bool stop(
unsigned int catKey);
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition Audaspace.h:119
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition Audaspace.h:116
#define AUD_API
Used for exporting symbols in the shared library.
Definition Audaspace.h:93
The PlaybackCategory class.
This class allows to control groups of playing sounds easily.
Definition PlaybackManager.h:39
bool pause(unsigned int catKey)
Pauses all current playing sounds of a category.
bool clean(unsigned int catKey)
Removes all the invalid handles of a category.
bool setVolume(float volume, unsigned int catKey)
Sets the volume for a category.
std::shared_ptr< IDevice > getDevice()
Retrieves the device of the PlaybackManager.
bool stop(unsigned int catKey)
Stops and erases a category of sounds.
PlaybackManager(std::shared_ptr< IDevice > device)
Creates a new PlaybackManager.
unsigned int addCategory(float volume)
Adds an existent category to the manager and returns a key to access it.
std::shared_ptr< IHandle > play(std::shared_ptr< ISound > sound, unsigned int catKey)
Plays a sound and adds it to a new or existent category.
float getVolume(unsigned int catKey)
Retrieves the volume of a category.
bool resume(unsigned int catKey)
Resumes all the paused sounds of a category.
void clean()
Removes all the invalid handles of all the categories.
unsigned int addCategory(std::shared_ptr< PlaybackCategory > category)
Adds an existent category to the manager and returns a key to access it.