This topic has not yet been rated - Rate this topic

ISpStream::SetBaseStream (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

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

ValueDescription
S_OKFunction completed successfully.
E_INVALIDARGOne or more parameters are invalid.
SPERR_ALREADY_INITIALIZEDThe 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.
Did you find this helpful?
(1500 characters remaining)