|
Audaspace 1.7.0
A high level audio library.
|
This class allows to have a list of sound that will play sequentially or randomly with each playback. More...
#include <SoundList.h>

Public Member Functions | |
| SoundList (bool random=false) | |
| Creates a new, empty sound list. | |
| SoundList (std::vector< std::shared_ptr< ISound > > &list, bool random=false) | |
| Creates a new sound list and initializes it. | |
| virtual std::shared_ptr< IReader > | createReader () |
| Creates a reader for playback of the sound source. | |
| void | addSound (std::shared_ptr< ISound > sound) |
| Adds a sound to the list. | |
| void | setRandomMode (bool random) |
| Sets the playback mode of the sound list. | |
| bool | getRandomMode () |
| Returns the playback mode of the sound list. | |
| int | getSize () |
| Returns the amount of sounds in the list. | |
| Public Member Functions inherited from ISound | |
| virtual | ~ISound () |
| Destroys the sound. | |
This class allows to have a list of sound that will play sequentially or randomly with each playback.
| SoundList::SoundList | ( | bool | random = false | ) |
Creates a new, empty sound list.
Sounds must be added to the list using the addSound() method.
| random | False if the sounds int he list must be played sequentially. True if random. |
| SoundList::SoundList | ( | std::vector< std::shared_ptr< ISound > > & | list, |
| bool | random = false ) |
Creates a new sound list and initializes it.
| list | A vector with sounds to initialize the list. |
| random | False if the sounds int he list must be played sequentially. True if random. |
| void SoundList::addSound | ( | std::shared_ptr< ISound > | sound | ) |
Adds a sound to the list.
The added sounds can be played sequentially or randomly dependig on the m_random flag
| sound | A shared_ptr to the sound. |
|
virtual |
| bool SoundList::getRandomMode | ( | ) |
Returns the playback mode of the sound list.
The two posible modes are random and sequential.
| int SoundList::getSize | ( | ) |
Returns the amount of sounds in the list.
| void SoundList::setRandomMode | ( | bool | random | ) |
Sets the playback mode of the sound list.
There are two posible modes, random and sequential.
| random | True to activate the random mode, false to activate sequential mode. |