Bewerken

Delen via


IAudioClient2::GetBufferSizeLimits method (audioclient.h)

The GetBufferSizeLimits method returns the buffer size limits of the hardware audio engine in 100-nanosecond units.

Syntax

HRESULT GetBufferSizeLimits(
  [in]  const WAVEFORMATEX *pFormat,
  [in]  BOOL               bEventDriven,
  [out] REFERENCE_TIME     *phnsMinBufferDuration,
  [out] REFERENCE_TIME     *phnsMaxBufferDuration
);

Parameters

[in] pFormat

A pointer to the target format that is being queried for the buffer size limit.

[in] bEventDriven

Boolean value to indicate whether or not the stream can be event-driven.

[out] phnsMinBufferDuration

Returns a pointer to the minimum buffer size (in 100-nanosecond units) that is required for the underlying hardware audio engine to operate at the format specified in the pFormat parameter, without frequent audio glitching.

[out] phnsMaxBufferDuration

Returns a pointer to the maximum buffer size (in 100-nanosecond units) that the underlying hardware audio engine can support for the format specified in the pFormat parameter.

Return value

The GetBufferSizeLimits method returns S_OK to indicate that it has completed successfully. Otherwise it returns an appropriate error code. For example, it can return AUDCLNT_E_DEVICE_INVALIDATED, if the device was removed and the method is called.

Remarks

The GetBufferSizeLimits method is a device-facing method
and does not require prior audio stream initialization.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 [desktop apps | UWP apps]
Target Platform Windows
Header audioclient.h

See also

IAudioClient2