StreamQueuePushData method |
|
Remarks
Pushes uncompressed PCM data taken from a memory buffer into a sound stream previously created through the StreamQueueCreate method. When feeding PCM data into a stream in playback, this method should be called at a rate sufficient to sustain playback without glitches: if for any reason the control shouldn't receive enough PCM data, it would be forced to stall playback and to fire a StreamQueueStalled event; when enough PCM data should be available again, the SoundPlaying event would be fired automatically.
The amount of still buffered bytes can be obtained through the StreamQueueBufferedDataGet method.
Syntax
[Visual Basic] Public Function StreamQueuePushData ( nPlayerIndex as Int16, pBuffer() as Byte, nBufferLength as Int32 ) as enumErrorCodes |
[C#] public enumErrorCodes StreamQueuePushData ( Int16 nPlayerIndex, byte[] pBuffer, Int32 nBufferLength ); |
[C++] public: enumErrorCodes StreamQueuePushData ( Int16 nPlayerIndex, unsigned char __gc[] pBuffer, Int32 nBufferLength ); |
Parameter |
Description |
|
|
nPlayerIndex |
Number representing the zero-based index of the involved player |
pBuffer |
Buffer containing uncompressed PCM data to push into the queue |
nBufferLen |
Length in bytes of the given buffer |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.NOERROR (0) |
The method call was successful. |