CXAPOBase::ValidateFormatPair method (xapobase.h)

Verifies that an input and output format pair configuration is supported by the XAPO.

Syntax

HRESULT ValidateFormatPair(
  const WAVEFORMATEX *pSupportedFormat,
  WAVEFORMATEX       *pRequestedFormat,
  BOOL               fOverwrite
);

Parameters

pSupportedFormat

An audio format known to be supported by the XAPO.

pRequestedFormat

An audio format to examine, must be a pointer to a WAVEFORMATEXTENSIBLE structure if fOverWrite is TRUE.

fOverwrite

If TRUE indicates that pRequestedFormat should be overwritten with the nearest audio format supported if the requested format is not supported. The nearest audio format is determined by bit depth, framerate and channel count in that order of importance.

Return value

Returns S_OK if the format pair is supported. Returns XAPO_E_FORMAT_UNSUPPORTED if the format pair is unsupported; pRequestedFormat will be overwritten if fOverWrite is TRUE. Returns E_INVALIDARG if either audio format was invalid; pRequestedFormat will be left untouched.

Remarks

Platform Requirements

Windows 10 (XAudio2.9); Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)

Requirements

Requirement Value
Target Platform Windows
Header xapobase.h
Library XAPOBase.lib

See also

CXAPOBase