#include <audiostream.h>
Public Member Functions | |
virtual void | queueAudioStream (Audio::AudioStream *audStream, DisposeAfterUse::Flag disposeAfterUse=DisposeAfterUse::YES)=0 |
void | queueBuffer (byte *data, uint32 size, DisposeAfterUse::Flag disposeAfterUse, byte flags) |
virtual void | finish ()=0 |
virtual uint32 | numQueuedStreams () const =0 |
Public Member Functions inherited from Audio::AudioStream | |
virtual int | readBuffer (int16 *buffer, const int numSamples)=0 |
virtual bool | isStereo () const =0 |
virtual int | getRate () const =0 |
virtual bool | endOfData () const =0 |
virtual bool | endOfStream () const |
A QueuingAudioStream class that allows for queuing multiple audio streams for playback.
|
pure virtual |
Queue an audio stream for playback.
This stream plays all queued streams, in the order in which they were queued. If disposeAfterUse is set to DisposeAfterUse::YES, then the queued stream is deleted after all data contained in it has been played.
void Audio::QueuingAudioStream::queueBuffer | ( | byte * | data, |
uint32 | size, | ||
DisposeAfterUse::Flag | disposeAfterUse, | ||
byte | flags | ||
) |
Queue a block of raw audio data for playback.
This stream plays all queued blocks, in the order in which they were queued. If disposeAfterUse is set to DisposeAfterUse::YES, then the queued block is released using free() after all data contained in it has been played.
data | Pointer to the audio data block. |
size | Length of the audio data block. |
disposeAfterUse | If equal to DisposeAfterUse::YES, the block is released using free() after use. |
flags | A bit-ORed combination of RawFlags describing the audio data format. |
|
pure virtual |
Mark this stream as finished.
This is used to signal that no further data will be queued to the stream. The stream is only considered as ended after this has been done.
|
pure virtual |
Return the number of streams still queued for playback (including the currently playing stream).