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:
- By using one of the techniques described in IMMDevice Interface, obtain a reference to the IMMDevice interface for an audio endpoint device.
- 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:
The IAudioClient interface inherits from the IUnknown interface. IAudioClient also has these types of members:
The IAudioClient interface has these methods.
Retrieves the size (maximum capacity) of the audio buffer associated with the endpoint.
Retrieves the number of frames of padding in the endpoint buffer.
Retrieves the length of the periodic interval separating successive processing passes by the audio engine on the data in the endpoint buffer.
Retrieves the stream format that the audio engine uses for its internal processing of shared-mode streams.
Accesses additional services from the audio client object.
Retrieves the maximum latency for the current stream and can be called any time after the stream has been initialized.
Initializes the audio stream.
Indicates whether the audio endpoint device supports a particular stream format.
Resets the audio stream.
Sets the event handle that the audio engine will signal each time a buffer becomes ready to be processed by the client.
Starts the audio stream.
Stops the audio stream.
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.
Minimum supported client
|Windows Vista [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2008 [desktop apps | Windows Store apps]|
Build date: 11/16/2013