IAudio::WaveFormatGet

HRESULT WaveFormatGet(PSDATA pdWFEX);

Gets the wave format that is expected and used by the audio device.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY
AUDERR_NEEDWAVEFORMAT

pdWFEX

[out] Address of an SDATA structure that receives a pointer to a WAVEFORMATEX structure containing wave format information for the audio device.

If the audio-source or destination is attached to file, the WAVEFORMATEX structure is loaded with the file's wave format.

It is up to the calling application to free the memory allocated by the function using the CoTaskMemAlloc and CoTaskMemFree functions.