Doly C++ SDK v1.00
Loading...
Searching...
No Matches
SoundEventListener Class Reference

Observer interface for receiving sound playback events. More...

#include <SoundEventListener.h>

Public Member Functions

virtual ~SoundEventListener ()=default
virtual void onSoundBegin (uint16_t id, float volume)
 Called when playback begins.
virtual void onSoundComplete (uint16_t id)
 Called when playback completes successfully.
virtual void onSoundAbort (uint16_t id)
 Called when playback is aborted.
virtual void onSoundError (uint16_t id)
 Called when a playback error occurs.

Detailed Description

Observer interface for receiving sound playback events.

Register an implementation using SoundEvent::AddListener().

Warning
Do not destroy a listener object while it is registered.

Constructor & Destructor Documentation

◆ ~SoundEventListener()

virtual SoundEventListener::~SoundEventListener ( )
virtualdefault

Member Function Documentation

◆ onSoundAbort()

virtual void SoundEventListener::onSoundAbort ( uint16_t id)
virtual

Called when playback is aborted.

Parameters
idUser-defined sound id passed to SoundControl::play().

◆ onSoundBegin()

virtual void SoundEventListener::onSoundBegin ( uint16_t id,
float volume )
virtual

Called when playback begins.

Parameters
idUser-defined sound id passed to SoundControl::play().
volumeCurrent playback volume (implementation-defined scale).

◆ onSoundComplete()

virtual void SoundEventListener::onSoundComplete ( uint16_t id)
virtual

Called when playback completes successfully.

Parameters
idUser-defined sound id passed to SoundControl::play().

◆ onSoundError()

virtual void SoundEventListener::onSoundError ( uint16_t id)
virtual

Called when a playback error occurs.

Parameters
idUser-defined sound id passed to SoundControl::play().

The documentation for this class was generated from the following file: