IAudioDeviceEndpoint::SetBuffer method

The SetBuffer method initializes the endpoint and creates a buffer based on the format of the endpoint into which the audio data is streamed.

Syntax

HRESULT SetBuffer(
  HNSTIME MaxPeriod,
  UINT32  u32LatencyCoefficient
);

Parameters

MaxPeriod

The processing time, in 100-nanosecond units, of the audio endpoint.

u32LatencyCoefficient

The latency coefficient for the audio device. This value is used to calculate the latency. Latency = u32LatencyCoefficient * MaxPeriod.

Note  The device that the endpoint represents has a minimum latency value. If the value of this parameter is less than the minimum latency of the device or is zero, the endpoint object applies the minimum latency. The audio engine can obtain the actual latency of the endpoint by calling the IAudioEndpoint::GetLatency method.
 

Return Value

If the method succeeds, it returns S_OK.

If it fails, possible return codes include, but are not limited to, the following.

Remarks

The Remote Desktop Services AudioEndpoint API is for use in Remote Desktop scenarios; it is not for client applications.

Requirements

   
Windows version Windows 7 Windows Server 2008 R2
Target Platform Windows
Header audioengineendpoint.h

See Also

IAudioDeviceEndpoint