CXAPOBase::ValidateFormatPair Method

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

Syntax

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

Parameters

pSupportedFormat
Type: WAVEFORMATEX *

An audio format known to be supported by the XAPO.

pRequestedFormat
Type: WAVEFORMATEX *

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

fOverwrite
Type: BOOL 

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

Type: HRESULT 

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

Requirements

Header: Declared in xapobase.h.

Library: Use xapobase.lib.

See also

CXAPOBase

CXAPOBase Members