ISpStream::SetBaseStream (Microsoft Speech Platform)

Microsoft Speech Platform SDK 11

Microsoft Speech Platform

ISpStream::SetBaseStream

ISpStream::SetBaseStream initializes the ISpStream object with the format of the IStream and an object to encapsulate.

HRESULT SetBaseStream(
    IStream                *pStream,
    REFGUID                 rguidFormat,
    const WAVEFORMATEX     *pWaveFormatEx
);

Parameters

pStream
Address of the IStream containing the base stream data.
rguidFormat
The data format identifier associated with the stream.
pWaveFormatEx
Address of the WAVEFORMATEX structure that contains the wave file format information. If guidFormatId is SPDFID_WaveFormatEx, this must point to a valid WAVEFORMATEX structure. For other formats, it should be NULL.

Return values

Value Description
S_OK Function completed successfully.
E_INVALIDARG One or more parameters are invalid.
SPERR_ALREADY_INITIALIZED The object has already been initialized.
FAILED (hr) Appropriate error message.

Remarks

The helper class CSpStreamFormat and the SPSTREAMFORMAT enumeration can be used to avoid the possibility of typos or mistakes when filling in the WAVEFORMATEX structure.