RioEngine
0.1
My first attempt to create a 3D WYSIWYG Game Engine
|
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>
Public Member Functions | |
virtual | ~ISoundMixedOutputReceiver () |
destructor More... | |
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. More... | |
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.
Definition at line 20 of file ik_ISoundMixedOutputReceiver.h.
|
inlinevirtual |
destructor
Definition at line 25 of file ik_ISoundMixedOutputReceiver.h.
|
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.
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. |