Share via


Note

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

Microsoft Speech Platform

CSpStreamFormat::ParamValidateAssignFormat

CSpStreamFormat::ParamValidateAssignFormat validates the format ID and WAV format. If successful, creates the stream using AssignFormat.

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

Parameters

  • rguidFormatId
    The reference format ID of the requesting stream.
  • pWaveFormatEx
    The wave format of the requesting stream.
  • fRequireWaveFormat
    Optional Boolean indicating to create the stream only if the wave format is of a standard type. It is FALSE by default and may be omitted. TRUE, allows the creation of custom formats.

Return Values

Value Description
E_INVALIDARG At least one of pWaveFormatEx is NULL, pWaveFormatEx is bad or not valid, rguidFormatId is not SPDFID_WaveFormatEx, or pWaveFormatEx is a non-standard format and is disallowed by fRequireWaveFormat.