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 has these methods.
|IAudioClient::GetBufferSize||The GetBufferSize method retrieves the size (maximum capacity) of the endpoint buffer.|
|IAudioClient::GetCurrentPadding||The GetCurrentPadding method retrieves the number of frames of padding in the endpoint buffer.|
|IAudioClient::GetDevicePeriod||The GetDevicePeriod method retrieves the length of the periodic interval separating successive processing passes by the audio engine on the data in the endpoint buffer.|
|IAudioClient::GetMixFormat||The GetMixFormat method retrieves the stream format that the audio engine uses for its internal processing of shared-mode streams.|
|IAudioClient::GetService||The GetService method accesses additional services from the audio client object.|
|IAudioClient::GetStreamLatency||The GetStreamLatency method retrieves the maximum latency for the current stream and can be called any time after the stream has been initialized.|
|IAudioClient::Initialize||The Initialize method initializes the audio stream.|
|IAudioClient::IsFormatSupported||The IsFormatSupported method indicates whether the audio endpoint device supports a particular stream format.|
|IAudioClient::Reset||The Reset method resets the audio stream.|
|IAudioClient::SetEventHandle||The SetEventHandle method sets the event handle that the system signals when an audio buffer is ready to be processed by the client.|
|IAudioClient::Start||The Start method starts the audio stream.|
|IAudioClient::Stop||The Stop method stops the audio stream.|
|Windows version||Windows Vista [desktop apps | UWP apps] Windows Server 2008 [desktop apps | UWP apps]|