Share via


ISpStreamFormatConverter::SetBaseStream (SAPI 5.3)

Microsoft Speech API 5.3

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
S_OK
E_INVALIDARG