irrklang::ISoundMixedOutputReceiver Class Reference

Interface to be implemented by the user, which recieves the mixed output when it it played by the sound engine. More...

#include <ik_ISoundMixedOutputReceiver.h>

List of all members.

Public Member Functions

virtual ~ISoundMixedOutputReceiver ()
 destructor
virtual void OnAudioDataReady (const void *data, int byteCount, int playbackrate)=0
 Called when a chunk of sound has been mixed and is about to be played.

Detailed Description

Interface to be implemented by the user, which recieves the mixed output when it it played by the sound engine.

This can be used to store the sound output as .wav file or for creating a Oscillograph or similar. Simply implement your own class derived from ISoundMixedOutputReceiver and use ISoundEngine::setMixedDataOutputReceiver to let the audio driver know about it.


Constructor & Destructor Documentation

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

destructor


Member Function Documentation

virtual void irrklang::ISoundMixedOutputReceiver::OnAudioDataReady ( const void *  data,
int  byteCount,
int  playbackrate 
) [pure virtual]

Called when a chunk of sound has been mixed and is about to be played.

Note: This is called from the playing thread of the sound library, so you need to make everything you are doing in this method thread safe. Additionally, it would be a good idea to do nothing complicated in your implementation and return as fast as possible, otherwise sound output may be stuttering.

Parameters:
data representing the sound frames which just have been mixed. Sound data always consists of two interleaved sound channels at 16bit per frame.
byteCount Amount of bytes of the data
playbackrate The playback rate at samples per second (usually something like 44000). This value will not change and always be the same for an instance of an ISoundEngine.

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)