Share via


Microsoft Speech SDK Version 5.1

ISpStreamFormatConverter::SetBaseStream

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
);

Parameters

  • pStream
    [in] The stream to be wrapped. If NULL, the current base stream is released and any associated resources are released.

  • fSetFormatToBaseStreamFormat
    [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.

  • fWriteToBaseStream
    [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

Value Description
S_OK Function completed successfully.
E_INVALIDARG pStream was invalid.