The IAudioData interface provides methods that enable applications to set and get the underlying audio data that audio streams will reference. The audio data format is set in the WAVEFORMATEX structure.
When to Implement
Implement this interface on underlying audio data objects that audio stream sample objects will access.
When to Use
Applications use this interface to set and retrieve information on underlying data objects that an audio stream will reference.
Methods in Vtable Order
| IUnknown methods | Description |
| QueryInterface | Retrieves pointers to supported interfaces. |
| AddRef | Increments the reference count. |
| Release | Decrements the reference count. |
| IAudioData methods | Description |
| GetFormat | Retrieves the current data format. |
| SetFormat | Sets the current data format. |
Retrieves the current data format.
HRESULT GetFormat(
WAVEFORMATEX *pWaveFormatCurrent );
Returns S_OK if successful or E_POINTER if pointer is invalid.
Currently, DirectShow only supports PCM wave data.
IAudioData::SetFormat
Sets the current data format.
HRESULT SetFormat(
const WAVEFORMATEX *lpWaveFormat );
Returns an HRESULT value, which can include the following values.
| Value | Meaning |
| E_POINTER | Invalid pointer argument. |
| E_INVALIDARG | Invalid format. |
| S_OK | Success. |
IAudioData::GetFormat
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.