Audaspace 1.5.0
A high level audio library.
|
This class represents a category of related sounds which are currently playing and allows to control them easily. More...
#include <PlaybackCategory.h>
Public Member Functions | |
PlaybackCategory (std::shared_ptr< IDevice > device) | |
Creates a new PlaybackCategory. | |
std::shared_ptr< IHandle > | play (std::shared_ptr< ISound > sound) |
Plays a new sound in the category. | |
void | resume () |
Resumes all the paused sounds of the category. | |
void | pause () |
Pauses all current played back sounds of the category. | |
float | getVolume () |
Retrieves the volume of the category. | |
void | setVolume (float volume) |
Sets the volume for the category. | |
void | stop () |
Stops all the playing back or paused sounds. | |
std::shared_ptr< VolumeStorage > | getSharedVolume () |
Retrieves the shared volume of the category. | |
void | cleanHandles () |
Cleans the category erasing all the invalid handles. | |
This class represents a category of related sounds which are currently playing and allows to control them easily.
PlaybackCategory::PlaybackCategory | ( | std::shared_ptr< IDevice > | device | ) |
Creates a new PlaybackCategory.
device | A shared pointer to the device which will be used for playback. |
void PlaybackCategory::cleanHandles | ( | ) |
Cleans the category erasing all the invalid handles.
Only needed if individual sounds are stopped with their handles.
std::shared_ptr< VolumeStorage > PlaybackCategory::getSharedVolume | ( | ) |
Retrieves the shared volume of the category.
float PlaybackCategory::getVolume | ( | ) |
Retrieves the volume of the category.
Plays a new sound in the category.
sound | The sound to be played. |
void PlaybackCategory::setVolume | ( | float | volume | ) |
Sets the volume for the category.
volume | The volume. |