irrklang::ISoundStopEventReceiver Class Reference

Interface to be implemented by the user, which recieves sound stop events. More...

#include <ik_ISoundStopEventReceiver.h>

List of all members.

Public Member Functions

virtual ~ISoundStopEventReceiver ()
 destructor
virtual void OnSoundStopped (ISound *sound, E_STOP_EVENT_CAUSE reason, void *userData)=0
 Called when a sound has stopped playing.

Detailed Description

Interface to be implemented by the user, which recieves sound stop events.

The interface has only one method to be implemented by the user: OnSoundStopped(). Implement this interface and set it via ISound::setSoundStopEventReceiver(). The sound stop event is guaranteed to be called when a sound or sound stream is finished, either because the sound reached its playback end, its sound source was removed, ISoundEngine::stopAllSounds() has been called or the whole engine was deleted.


Constructor & Destructor Documentation

virtual irrklang::ISoundStopEventReceiver::~ISoundStopEventReceiver (  )  [inline, virtual]

destructor


Member Function Documentation

virtual void irrklang::ISoundStopEventReceiver::OnSoundStopped ( ISound sound,
E_STOP_EVENT_CAUSE  reason,
void *  userData 
) [pure virtual]

Called when a sound has stopped playing.

This is the only method to be implemented by the user. The sound stop event is guaranteed to be called when a sound or sound stream is finished, either because the sound reached its playback end, its sound source was removed, ISoundEngine::stopAllSounds() has been called or the whole engine was deleted. Please note: Sound events will occur in a different thread when the engine runs in multi threaded mode (default). In single threaded mode, the event will happen while the user thread is calling ISoundEngine::update().

Parameters:
sound,: Sound which has been stopped.
reason,: The reason why the sound stop event was fired. Usually, this will be ESEC_SOUND_FINISHED_PLAYING. When the sound was aborded by calling ISound::stop() or ISoundEngine::stopAllSounds();, this would be ESEC_SOUND_STOPPED_BY_USER. If irrKlang was deleted or the sound source was removed, the value is ESEC_SOUND_STOPPED_BY_SOURCE_REMOVAL.
userData,: userData pointer set by the user when registering the interface via ISound::setSoundStopEventReceiver().

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

irrKlang Audio Library
The irrKlang Engine Documentation © 2003-2018 by Nikolaus Gebhardt. Generated by Doxygen (1.6.1)