IAudioData Interface


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.


IAudioData::GetFormat

IAudioData Interface

Retrieves the current format of the data in a WAVEFORMATEX structure.

HRESULT GetFormat(
  WAVEFORMATEX *pWaveFormatCurrent );

Parameters
pWaveFormatCurrent
[out] Pointer to a WAVEFORMATEX structure.
Return Values

Returns S_OK if successful or E_POINTER if pointer is invalid.

Remarks

Currently only PCM wave data is supported.

See Also

IAudioData::SetFormat


IAudioData::SetFormat

IAudioData Interface

Sets the current format of the data in a WAVEFORMATEX structure.

HRESULT SetFormat(
  const WAVEFORMATEX *lpWaveFormat );

Parameters
lpWaveFormat
[in] Pointer to a WAVEFORMATEX structure.
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

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