Doly C++ SDK v1.00
Loading...
Searching...
No Matches
SoundEvent Namespace Reference

Functions

void AddListener (SoundEventListener *observer, bool priority=false)
 Register a SoundEventListener instance.
void RemoveListener (SoundEventListener *observer)
 Unregister a previously registered SoundEventListener instance.
void AddListenerOnBegin (void(*onComplete)(uint16_t id, float volume))
 Register a static/free function to receive begin events.
void RemoveListenerOnBegin (void(*onComplete)(uint16_t id, float volume))
 Unregister a previously registered begin callback.
void AddListenerOnComplete (void(*onComplete)(uint16_t id))
 Register a static/free function to receive completion events.
void RemoveListenerOnComplete (void(*onComplete)(uint16_t id))
 Unregister a previously registered completion callback.
void AddListenerOnAbort (void(*onAbort)(uint16_t id))
 Register a static/free function to receive abort events.
void RemoveListenerOnAbort (void(*onAbort)(uint16_t id))
 Unregister a previously registered abort callback.
void AddListenerOnError (void(*onAbort)(uint16_t id))
 Register a static/free function to receive error events.
void RemoveListenerOnError (void(*onAbort)(uint16_t id))
 Unregister a previously registered error callback.

Function Documentation

◆ AddListener()

void SoundEvent::AddListener ( SoundEventListener * observer,
bool priority = false )

Register a SoundEventListener instance.

Parameters
observerListener object to register.
priorityIf true, the listener is inserted with higher priority (called earlier).
Warning
Keep observer alive while it is registered. Unregister it before destruction.

◆ AddListenerOnAbort()

void SoundEvent::AddListenerOnAbort ( void(* onAbort )(uint16_t id))

Register a static/free function to receive abort events.

Parameters
onAbortCallback invoked when playback is aborted.
Examples
SoundControl/main.cpp.

◆ AddListenerOnBegin()

void SoundEvent::AddListenerOnBegin ( void(* onComplete )(uint16_t id, float volume))

Register a static/free function to receive begin events.

Parameters
onCompleteCallback invoked when playback begins.
Examples
SoundControl/main.cpp.

◆ AddListenerOnComplete()

void SoundEvent::AddListenerOnComplete ( void(* onComplete )(uint16_t id))

Register a static/free function to receive completion events.

Parameters
onCompleteCallback invoked when playback completes.
Examples
SoundControl/main.cpp.

◆ AddListenerOnError()

void SoundEvent::AddListenerOnError ( void(* onAbort )(uint16_t id))

Register a static/free function to receive error events.

Parameters
onAbortCallback invoked when a playback error occurs.
Examples
SoundControl/main.cpp.

◆ RemoveListener()

void SoundEvent::RemoveListener ( SoundEventListener * observer)

Unregister a previously registered SoundEventListener instance.

Parameters
observerListener object to unregister.

◆ RemoveListenerOnAbort()

void SoundEvent::RemoveListenerOnAbort ( void(* onAbort )(uint16_t id))

Unregister a previously registered abort callback.

Parameters
onAbortCallback to remove.
Examples
SoundControl/main.cpp.

◆ RemoveListenerOnBegin()

void SoundEvent::RemoveListenerOnBegin ( void(* onComplete )(uint16_t id, float volume))

Unregister a previously registered begin callback.

Parameters
onCompleteCallback to remove.
Examples
SoundControl/main.cpp.

◆ RemoveListenerOnComplete()

void SoundEvent::RemoveListenerOnComplete ( void(* onComplete )(uint16_t id))

Unregister a previously registered completion callback.

Parameters
onCompleteCallback to remove.
Examples
SoundControl/main.cpp.

◆ RemoveListenerOnError()

void SoundEvent::RemoveListenerOnError ( void(* onAbort )(uint16_t id))

Unregister a previously registered error callback.

Parameters
onAbortCallback to remove.
Examples
SoundControl/main.cpp.