CXAPOBase::ValidateFormatDefault Method

Verifies that an audio format falls within the default ranges supported.

Syntax

protected:
HRESULT ValidateFormatDefault(
         WAVEFORMATEX *pFormat,
         BOOL fOverwrite
)  

Parameters

pFormat
Type: WAVEFORMATEX *

[in, out] Audio format to validate.

fOverwrite
Type: BOOL 

If TRUE indicates that pFormat should be overwritten with the nearest audio format supported if the format it specified 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 

Return S_OK if the audio format is supported. Returns XAPO_E_FORMAT_UNSUPPORTED if the audio format is unsupported, pFormat will be overwritten with the nearest audio format if fOverwrite is TRUE. Returns E_INVALIDARG if the audio format is invalid, in which case pFormat will be left untouched.

Remarks

Requirements

Header: Declared in xapobase.h.

Library: Use xapobase.lib.

See also

CXAPOBase

CXAPOBase Members