Copyright © 2005-2019 MultiMedia Soft

StreamQueuePushData method

Previous pageReturn to chapter overviewNext page

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 invoke the CallbackForPlayersEvents delegate with the nEvent parameter set to EV_SOUND_STALLED; when enough PCM data should be available again, the CallbackForPlayersEvents delegate is automatically invoked again with the nEvent parameter set to EV_SOUND_PLAYING.

 

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.