Note
Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.
Microsoft Speech Platform
ISpStream::SetBaseStream
ISpStream::SetBaseStream initializes the ISpStream object with the format of the IStream and an object to encapsulate.
<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT SetBaseStream(</strong> <strong> IStream</strong> *<em>pStream</em>, <strong> REFGUID</strong> <em>rguidFormat</em>, <strong>const</strong> <a runat="server" href="jj127893(v=msdn.10).md"><strong>WAVEFORMATEX</strong></a> *<em>pWaveFormatEx</em> <strong>);</strong> </pre>
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.