public class AudioRenderClient : ComObject
The AudioRenderClient class enables a client to write output data to a rendering endpoint buffer.
For more information, see .
AudioRenderClient(IntPtr ptr)
Initializes a new instance of the AudioRenderClient class.
public void AudioRenderClient(IntPtr ptr)
Parameters
ptr
IntPtrPointer to the AudioRenderClient instance.
FromAudioClient(AudioClient audioClient)
Returns a new instance of the AudioRenderClient class. This is done by calling the GetService method of the AudioClient class.
public static AudioRenderClient FromAudioClient(AudioClient audioClient)
Parameters
audioClient
AudioClientThe AudioClient instance which should be used to create the new AudioRenderClient instance.
Returns
A new instance of the AudioRenderClient class.
GetBuffer(Int32 numFramesRequested)
Retrieves a pointer to the next available space in the rendering endpoint buffer into which the caller can write a data packet.
public IntPtr GetBuffer(Int32 numFramesRequested)
Parameters
numFramesRequested
Int32The number of audio frames in the data packet that the caller plans to write to the requested space in the buffer. If the call succeeds, the size of the buffer area pointed to by return value matches the size specified in numFramesRequested.
Returns
A pointer variable into which the method writes the starting address of the buffer area into which the caller will write the data packet.
GetBufferNative(Int32 numFramesRequested, IntPtr& buffer)
Retrieves a pointer to the next available space in the rendering endpoint buffer into which the caller can write a data packet.
public Int32 GetBufferNative(Int32 numFramesRequested, IntPtr& buffer)
Parameters
numFramesRequested
Int32The number of audio frames in the data packet that the caller plans to write to the requested space in the buffer. If the call succeeds, the size of the buffer area pointed to by buffer matches the size specified in numFramesRequested.
buffer
IntPtr&Pointer variable into which the method writes the starting address of the buffer area into which the caller will write the data packet.
Returns
HRESULT
ReleaseBuffer(Int32 numFramesWritten, AudioClientBufferFlags flags)
Releases the buffer space acquired in the previous call to the GetBuffer method.
public void ReleaseBuffer(Int32 numFramesWritten, AudioClientBufferFlags flags)
Parameters
numFramesWritten
Int32The number of audio frames written by the client to the data packet. The value of this parameter must be less than or equal to the size of the data packet, as specified in the numFramesRequested parameter passed to the GetBuffer method.
flags
AudioClientBufferFlagsThe buffer-configuration flags.
ReleaseBufferNative(Int32 numFramesWritten, AudioClientBufferFlags flags)
Releases the buffer space acquired in the previous call to the GetBuffer method.
public Int32 ReleaseBufferNative(Int32 numFramesWritten, AudioClientBufferFlags flags)
Parameters
numFramesWritten
Int32The number of audio frames written by the client to the data packet. The value of this parameter must be less than or equal to the size of the data packet, as specified in the numFramesRequested parameter passed to the GetBuffer method.
flags
AudioClientBufferFlagsThe buffer-configuration flags.
Returns
HRESULT