Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

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 void OnSoundStopped (ISound *sound, E_STOP_EVENT_CAUSE reason, void *userData)=0
 Called when a sound has stopped playing.
virtual ~ISoundStopEventReceiver ()
 destructor


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.

Definition at line 41 of file ik_ISoundStopEventReceiver.h.


Constructor & Destructor Documentation

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

destructor

Definition at line 46 of file ik_ISoundStopEventReceiver.h.


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:
irrKlang Audio Library
The irrKlang Engine Documentation © 2003-2007 by Nikolaus Gebhardt. Generated on Fri Jun 13 05:55:51 2008 by Doxygen (1.5.4)