ISpStreamFormatConverter::SetBaseStream (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3


ISpStreamFormatConverter::SetBaseStream sets an audio stream to be wrapped by the format converter. The format converter is a stream object that encapsulates the base stream and performs format conversion on the fly during read/write operations.

HRESULT SetBaseStream(
   ISpStreamFormat   *pStream,
   BOOL               fSetFormatToBaseStreamFormat,
   BOOL               fWriteToBaseStream


[in] The stream to be wrapped. If NULL, the current base stream is released and any associated resources are released.
[in] Flag specifies that the converter's stream format will be set to the same format as the base stream (set up as a pass through).

If pStream == NULL and this is set to TRUE, the format converter's stream format is reset to be undefined.

[in] If TRUE, data will be written to the base stream. If FALSE, data will be read from the base stream. The format converter can only be in one I/O mode or the other at a time.

Return values

S_OKFunction completed successfully.
E_INVALIDARGpStream was invalid.