Share via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

Microsoft Speech Platform

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.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetBaseStream(</strong><a runat="server" href="jj127807(v=msdn.10).md"><strong>ISpStreamFormat</strong></a> *<em>pStream</em>, <strong> BOOL</strong> <em>fSetFormatToBaseStreamFormat,</em> <strong> BOOL</strong> <em>fWriteToBaseStream</em> <strong>);</strong> </pre>

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.