IAudioProcessingObject::IsInputFormatSupported method (audioenginebaseapo.h)
This method negotiates with the Windows Vista audio engine to establish a data format for the stream of audio data.
HRESULT IsInputFormatSupported( IAudioMediaType *pOppositeFormat, IAudioMediaType *pRequestedInputFormat, IAudioMediaType **ppSupportedInputFormat );
A pointer to an IAudioMediaType interface. This parameter is used to indicate the output format of the data. The value of pOppositeFormat must be set to NULL to indicate that the output format can be any type.
A pointer to an IAudioMediaType interface. This parameter is used to indicate the input format that is to be verified.
This parameter indicates the supported format that is closest to the format to be verified.
If the call completed successfully, the ppSupportedInputFormat parameter returns a pRequestedInputFormat pointer and the IsInputFormatSupported method returns a value of S_OK. Otherwise, this method returns one of the following error codes:
||The format of the input/output format pair is not supported. ppSupportedInputFormat returns a suggested new format.|
||The format to be verified is not supported. The value of ppSupportedInputFormat does not change.|
||Invalid pointer that is passed to the method. The value of ppSupportedInputFormat does not change.|
||These additional error conditions are tracked by the audio engine.|
There are differences in the implementation of the
IsInputFormatSupported method by the different APOs. For example, with certain implementations, the output can only be of type float when the input format is of type integer.
To initiate format negotiation, the audio service first sets the output of the LFX sAPO to the default float32-based format. The audio service then calls the
IAudioProcessingObject::IsInputFormatSupported method of the LFX sAPO, suggests the default format, and monitors the HRESULT response of this method. If the input of the LFX sAPO can support the suggested format, it returns S_OK, together with a reference to the supported format. If the input of the LFX sAPO cannot support the suggested format, it returns S_FALSE together with a reference to a format that is the closest match to the suggested one. If the LFX sAPO cannot support the suggested format and does not have a close match, it returns APOERR_FORMAT_NOT_SUPPORTED. The GFX sAPO works with the output format of the LFX sAPO. So the GFX sAPO is not involved in the format negotiation process.
|Minimum supported client||Available with Windows Vista and later Windows operating systems.|