Share via


ISpStreamFormatConverter::SetBaseStream (Windows Embedded CE 6.0)

1/6/2010

This method sets an audio stream to be wrapped by the format converter. The format converter is a stream object that encapsulates the base (unconverted) stream and does dynamic format conversion during read/write operations.

Syntax

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

Parameters

  • pStream
    [in] Pointer to the ISpStreamFormat object for the stream to be wrapped. If NULL, the current base stream is released and any associated resources are released.
  • fSetFormatToBaseStreamFormat
    [in] Value specifying if the format converter is to set the converter stream format to the format used by the base stream (set up as a pass-through). Set this value to TRUE to set the converter stream format to the base stream format, and to FALSE otherwise. If pStream is set to NULL and this parameter is set to TRUE, the format converter resets the stream format to be undefined.
  • fWriteToBaseStream
    [in] Value specifying how the format converter is to handle I/O for the base stream. Set this value to TRUE if the format converter writes data to the base stream, and to FALSE if the format converter reads data from the base stream. The format converter can only be in one I/O mode at a time.

Return Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

E_INVALIDARG

pStream was invalid.

Requirements

Header sapi.h, sapi.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpStreamFormatConverter
SAPI Interfaces