Copyright © 2005-2019 MultiMedia Soft

StreamQueuePushDataMs method

Previous pageReturn to chapter overviewNext page



Pushes uncompressed PCM data taken from a memory stream 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.


When version 3.0 or higher of the .NET framework is available, this method and the StreamQueueCreate method can be used in conjunction with the System.Speech.Synthesis.SpeechSynthesizer class in order to provide a mean for redirecting the output or applying special effect and visual feedbacks to the output of the System.Speech.Synthesis.SpeechSynthesizer.SetOutputToAudioStream method. See the How to integrate Microsoft's Speech API tutorial for details.





[Visual Basic]

Public Function StreamQueuePushDataMs (

nPlayerIndex as Int16,

ms as MemoryStream

) as enumErrorCodes



public enumErrorCodes StreamQueuePushDataMs (

Int16 nPlayerIndex,

MemoryStream ms




public: enumErrorCodes StreamQueuePushDataMs (

Int16 nPlayerIndex,

MemoryStream ms









Number representing the zero-based index of the involved player


Memory stream containing uncompressed PCM data to push into the queue



Return value






Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.