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

Event registration helpers for the sound subsystem. More...

#include <stdint.h>
#include "SoundEventListener.h"

Go to the source code of this file.

Namespaces

namespace  SoundEvent

Functions

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

Detailed Description

Event registration helpers for the sound subsystem.

Use this API to subscribe to sound playback notifications. Two callback styles are supported:

  • Object listeners (SoundEventListener*)
  • Static/free function callbacks (function pointers)

Threading notes:

  • Callbacks invoked from an internal worker/event thread.