Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IAudioClient interface

The IAudioClient interface enables a client to create and initialize an audio stream between an audio application and the audio engine (for a shared-mode stream) or the hardware buffer of an audio endpoint device (for an exclusive-mode stream). 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 Interface, 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.

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:

Members

The IAudioClient interface inherits from the IUnknown interface. IAudioClient also has these types of members:

Methods

The IAudioClient interface has these methods.

MethodDescription
GetBufferSize

Retrieves the size (maximum capacity) of the audio buffer associated with the endpoint.

GetCurrentPadding

Retrieves the number of frames of padding in the endpoint buffer.

GetDevicePeriod

Retrieves the length of the periodic interval separating successive processing passes by the audio engine on the data in the endpoint buffer.

GetMixFormat

Retrieves the stream format that the audio engine uses for its internal processing of shared-mode streams.

GetService

Accesses additional services from the audio client object.

GetStreamLatency

Retrieves the maximum latency for the current stream and can be called any time after the stream has been initialized.

Initialize

Initializes the audio stream.

IsFormatSupported

Indicates whether the audio endpoint device supports a particular stream format.

Reset

Resets the audio stream.

SetEventHandle

Sets the event handle that the audio engine will signal each time a buffer becomes ready to be processed by the client.

Start

Starts the audio stream.

Stop

Stops the audio stream.

 

Remarks

Note  In Windows 8, 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.

Windows Phone 8: This API is supported.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Audioclient.h

See also

IMMDevice::Activate
WASAPI

 

 

Community Additions

Show:
© 2014 Microsoft