Compartilhar via


ISpSREngine::GetInputAudioFormat (Windows CE 5.0)

Send Feedback

This method gets the audio formats that the SR engine supports and indicates if the engine can support a particular format. SAPI calls this method, specifying the audio format identifier (of type GUID) and a WAVEFORMATEX structure for wave formats.

If SAPI specifies a particular format in its call, the SR engine sees if it can support the request and gets the format, or the nearest supported format to the requested one. If SAPI passes NULL in the first two parameters of this method, the engine retrieves its preferred audio format.

HRESULT GetInputAudioFormat(const GUID* pguidSourceFormatId,const WAVEFORMATEX* pSourceWaveFormatEx,GUID* pguidDesiredFormatId,WAVEFORMATEX** ppCoMemDesiredWaveFormatEx,);

Parameters

  • pguidSourceFormatId
    [in] Identifier of an audio format. The identifier is set to a given format that the SR engine determines if it can support. Alternatively it is set to NULL to specify that the engine should select its preferred audio format.
  • pSourceWaveFormatEx
    [in] Pointer to a WAVEFORMATEX structure containing information about the requested audio format. This value will only be set if pSourceFormatId is set to SPDFID_WaveFormatEx to indicate a wave format.
  • pguidDesiredFormatId
    [out] Pointer to an identifier for the format that the engine can support.
  • ppCoMemDesiredWaveFormatEx
    [out] Address of a pointer to a WAVEFORMATEX structure containing the requested format details (wave formats only), or NULL for non-wave formats. For wave formats, the engine should call CoTaskMemAlloc for the structure before filling it.

Return Values

The following table shows the possible return values.

Value Description
S_OK Function completed successfully.
FAILED(hr) Appropriate error message.

Requirements

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

See Also

ISpSREngine | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.