Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ISpAudio::GetDefaultFormat (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

ISpAudio::GetDefaultFormat

ISpAudio::GetDefaultFormat passes back the default audio format.

HRESULT GetDefaultFormat(
   GUID            *pFormatId,
   WAVEFORMATEX   **ppCoMemWaveFormatEx
);

Parameters

pFormatId
[out] Pointer to the GUID of the default format.
ppCoMemWaveFormatEx
[out] Address of a pointer to the WAVEFORMATEX structure that receives the wave file format information. SAPI allocates the memory for the WAVEFORMATEX data structure using CoTaskMemAlloc, but it is the caller's responsibility to call CoTaskMemFree on the returned WAVEFORMATEX pointer.

Return values

ValueDescription
S_OKFunction completed successfully.
SPERR_UNINITIALIZEDStream is uninitialized.
E_POINTERpFormatId is invalid.

Remarks

Other formats may be supported by the audio device; however, this format is guaranteed to work. Older sound cards can potentially fail when attempting to use this format if they are not fully duplex or do not support full duplex operation at different frequencies. An application should attempt to degrade gracefully when this occurs.

Show:
© 2015 Microsoft