Note

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

Microsoft Speech Platform

CSpStreamFormat::CopyTo

CSpStreamFormat::CopyTo copies the instance's WAV format to a new stream.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT CopyTo(</strong> <strong>GUID</strong> *<em>pFormatId</em>, <strong>WAVEFORMATEX</strong> **<em>ppCoMemWFEX</em> <strong>);</strong> </pre>

Parameters

  • pFormatId
    The new format ID based on the class member m_guidFormatId's ID. If class member m_pCoMemWaveFormatEx is invalid, pFormatId is set to NULL.
  • ppCoMemWFEX
    The new wave format. If ppCoMemWFEX could not be successfully created, pFormatId is set to zero.

This method copies the instance's stream to an existing stream.

<pre IsFakePre="true" xmlns="http://www.w3.org/1999/xhtml"> <strong>HRESULT CopyTo( wCSpStreamFormat</strong> <em></em>&amp;Other; <strong>);</strong></pre>

Parameters

  • Other
    The existing stream to copy to. The stream is freed using CoTaskMemFree() first and the instance is then copied to it.

Return Values

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