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