Audaspace
1.3.0
A high level audio library.
|
Go to the documentation of this file.
33 #include <condition_variable>
48 std::vector<std::vector<std::shared_ptr<ISound>>> m_scenes;
63 std::shared_ptr<IHandle> m_currentHandle;
68 std::shared_ptr<IHandle> m_transitionHandle;
73 std::shared_ptr<IDevice> m_device;
78 std::atomic_bool m_transitioning;
83 std::atomic_bool m_stopThread;
88 std::atomic_int m_soundTarget;
98 std::thread m_fadeThread;
227 static void transitionCallback(
void* player);
228 static void sceneCallback(
void* player);
230 void crossfadeThread();
232 void fadeOutThread();
This class allows to play music depending on a current "scene", scene changes are managed by the clas...
Definition: DynamicMusic.h:43
float getVolume()
Retrieves the volume of the scenes.
bool stop()
Stops any played back or paused sound and sets the dynamic music player to default silent state (scen...
Status getStatus()
Returns the status of the current played back sound.
int addScene(std::shared_ptr< ISound > sound)
Adds a new scene to the manager.
bool changeScene(int id)
Changes to another scene.
bool setVolume(float volume)
Sets the volume for the scenes.
bool seek(float position)
Seeks in the current played back sound.
bool pause()
Pauses the current played back sound.
bool addTransition(int init, int end, std::shared_ptr< ISound > sound)
Adds a new transition between scenes.
bool resume()
Resumes a paused sound.
float getPosition()
Retrieves the current playback position of a sound.
DynamicMusic(std::shared_ptr< IDevice > device)
Creates a new dynamic music manager with the default silent scene (id: 0).
#define AUD_NAMESPACE_END
Closes the audaspace namespace aud.
Definition: Audaspace.h:119
int getScene()
Retrieves the scene currently selected.
void setFadeTime(float seconds)
Sets the length of the crossfade transition (default 1 second).
#define AUD_NAMESPACE_BEGIN
Opens the audaspace namespace aud.
Definition: Audaspace.h:116
Defines the IHandle interface as well as possible states of the handle.
#define AUD_API
Used for exporting symbols in the shared library.
Definition: Audaspace.h:93
float getFadeTime()
Gets the length of the crossfade transition (default 1 second).
Status
Status of a playback handle.
Definition: IHandle.h:31