Compartir a través de


ISpAudio::GetDefaultFormat (Windows CE 5.0)

Send Feedback

This method gets the default audio format. The audio device can support other formats. 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.

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 structure using CoTaskMemAlloc, but it is the caller's responsibility to call CoTaskMemFree on the returned WAVEFORMATEX pointer.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
SPERR_UNINITIALIZED Stream is uninitialized.
E_POINTER pFormatId is invalid.

Requirements

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpAudio | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.