IAudioCaptureClient interface

The IAudioCaptureClient interface enables a client to read input data from a capture endpoint buffer. The client obtains a reference to the IAudioCaptureClient interface on a stream object by calling the IAudioClient::GetService method with parameter riid set to REFIID IID_IAudioCaptureClient.

The methods in this interface manage the movement of data packets that contain capture data. The length of a data packet is expressed as the number of audio frames in the packet. The size of an audio frame is specified by the nBlockAlign member of the WAVEFORMATEX (or WAVEFORMATEXTENSIBLE) structure that the client obtains by calling the IAudioClient::GetMixFormat method. The size in bytes of an audio frame equals the number of channels in the stream multiplied by the sample size per channel. For example, the frame size is four bytes for a stereo (2-channel) stream with 16-bit samples. A packet always contains an integral number of audio frames.

When releasing an IAudioCaptureClient interface instance, the client must call the Release method of the instance from the same thread as the call to IAudioClient::GetService that created the object.

For a code example that uses the IAudioCaptureClient interface, see Capturing a Stream.

Members

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

Methods

The IAudioCaptureClient interface has these methods.

MethodDescription
GetBuffer

Retrieves a pointer to the next available packet of data in the capture endpoint buffer.

GetNextPacketSize

Retrieves the number of frames in the next data packet in the capture endpoint buffer.

ReleaseBuffer

Releases the buffer.

 

Remarks

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

IAudioClient::GetMixFormat
IAudioClient::GetService
WASAPI

 

 

Community Additions

ADD
Show:
© 2014 Microsoft