class Audio::PullAudioInputStreamCallback
An interface that defines callback methods for an audio input stream.
Derive from this class and implement its function to provide your own data as an audio input stream.
Members
~PullAudioInputStreamCallback
Syntax: public inline virtual ~PullAudioInputStreamCallback ( );
Destructor, does nothing.
Read
Syntax: public int Read ( uint8_t * dataBuffer , uint32_t size );
This function is called to synchronously get data from the audio stream. Note: The dataBuffer returned by Read() should not contain any audio header.
Parameters
dataBuffer
The pointer to the buffer to which to copy the audio data.size
The size of the buffer.
Returns
The number of bytes copied into the buffer, or zero to indicate end of stream
GetProperty
Syntax: public inline virtual SPXSTRING GetProperty ( PropertyId id );
This function is called to synchronously to get meta information associated to stream data, such as TimeStamp or UserId . Added in version 1.5.0.
Parameters
id
The id of the property.
Returns
The value of the property.
Close
Syntax: public void Close ( );
This function is called to close the audio stream.