DirectShow Animated Header -- IAudioData Interface DirectShow Animated Header -- IAudioData Interface* Microsoft DirectShow SDK
*Index  *Topic Contents
*Previous Topic: IMemoryData Interface
*Next Topic: IAMMultiMediaStream Interface

IAudioData Interface


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.


IAudioData::GetFormat

IAudioData Interface

Retrieves the current data format.

HRESULT GetFormat(
  WAVEFORMATEX *pWaveFormatCurrent );

Parameters
pWaveFormatCurrent
[out] Pointer to a WAVEFORMATEX structure that contains the current data format.
Return Values

Returns S_OK if successful or E_POINTER if pointer is invalid.

Remarks

Currently, DirectShow only supports PCM wave data.

See Also

IAudioData::SetFormat


IAudioData::SetFormat

IAudioData Interface

Sets the current data format.

HRESULT SetFormat(
  const WAVEFORMATEX *lpWaveFormat );

Parameters
lpWaveFormat
[in] Pointer to a WAVEFORMATEX structure that will contain the current data format.
Return Values

Returns an HRESULT value, which can include the following values.
Value Meaning
E_POINTER Invalid pointer argument.
E_INVALIDARG Invalid format.
S_OK Success.

See Also

IAudioData::GetFormat

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page