Share via


ISpSREngine::GetInputAudioFormat

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

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.

Syntax

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 Value

The following table shows the possible return values.

Value Description

S_OK

Function completed successfully.

FAILED(hr)

Appropriate error message.

Requirements

Header sapiddk.h, sapiddk.idl
Library sapilib.lib
Windows Embedded CE Windows CE .NET 4.1 and later

See Also

Reference

ISpSREngine
SAPI Interfaces