IAudioClient Interface

The IAudioClient interface enables a client to create and initialize an audio stream between an audio application and the audio engine.

A client obtains a reference to an IAudioClient interface for an audio endpoint device by following these steps:

  1. By using one of the techniques described in IMMDevice, obtain a reference to the IMMDevice interface for an audio endpoint device.
  2. Call the IMMDevice::Activate method with parameter iid set to REFIID IID_IAudioClient or IID_IAudioClient2.

The application thread that uses this interface must be initialized for COM. For more information about COM initialization, see the description of the CoInitializeEx function in the Windows SDK documentation.

For code examples that use the IAudioClient interface, see the following topics:

Syntax

interface IAudioClient : public IUnknown  

Remarks

The first use of IAudioClient to access the audio device should be on the STA thread. Calls from an MTA thread may result in undefined behavior.

Requirements

Header: Declared in audioclient.h.

Library: Use mmdevapi.lib.

See also

IAudioClient Members