Note

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

Microsoft Speech Platform

CSpStreamFormat::Constructor

The following methods may be used to construct the instance.

Initializes the class members to null values

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>CSpStreamFormat( void );</strong> </pre>

Parameters

None.

Formats the instance into a wave format structure. The new format and format ID are passed back from the class' public members, m_pCoMemWaveFormatEx and m_guidFormatId respectively.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>CSpStreamFormat(</strong> <strong><a runat="server" href="jj127480(v=msdn.10).md">SPSTREAMFORMAT</a></strong> <em>eFormat</em>, <strong>HRESULT</strong> *<em>phr</em> <strong>);</strong></pre>

Parameters

  • eFormat
    [in] The requested stream format. Must be a valid SPSTREAMFORMAT value of SPSF_8kHz8BitMono or greater.
  • phr
    The return value for the method.

Return Values

Value Description
S_OK Function completed successfully.
E_OUTOFMEMORY Exceeded available memory.
E_INVALIDARG Either class member m_guidFormatId or m_pCoMemWaveFormatEx is invalid or bad. Alternatively, the current format is not recognized.
FAILED(hr) Appropriate error message.

Formats the instance according to the format structure specified.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>CSpStreamFormat(</strong> <strong>const <a runat="server" href="jj127893(v=msdn.10).md">WAVEFORMATEX</a></strong> *<em>pWaveFormatEx,</em> <strong>HRESULT</strong> *<em>phr</em> <strong>);</strong></pre>

Parameters

  • pWaveFormatEx
    [in] Address of the WAVEFORMATEX structure containing the wave file format information.
  • phr
    The return value for the method.

Return Values

Value Description
S_OK Function completed successfully.
E_OUTOFMEMORY Exceeded available memory.