The IAudioData interface provides methods which allow 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 which will be accessed by audio stream sample objects.
When to Use
Applications use this interface to set and retrieve information on underlying data objects that will be referenced by an audio stream.
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 format of the data in a WAVEFORMATEX structure. |
SetFormat | Sets the current format of the data in a WAVEFORMATEX structure. |
Retrieves the current format of the data in a WAVEFORMATEX structure.
HRESULT GetFormat(
WAVEFORMATEX *pWaveFormatCurrent );
Returns S_OK if successful or E_POINTER if pointer is invalid.
Currently only PCM wave data is supported.
IAudioData::SetFormat
Sets the current format of the data in a WAVEFORMATEX structure.
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.