IPreFetchOffset::SetPreFetchOffset method (portcls.h)

The SetPreFetchOffset method sets the prefetch offset, which is the number of bytes of data separating the write cursor from the play cursor in a DirectSound output stream.

Syntax

void SetPreFetchOffset(
  [in] ULONG PreFetchOffset
);

Parameters

[in] PreFetchOffset

Specifies the prefetch offset size in bytes.

Return value

None

Remarks

A WavePci miniport driver calls the SetPreFetchOffset method to specify the prefetch offset of a hardware-accelerated DirectSound output stream.

The prefetch offset is the number of bytes of data separating the write cursor from the play cursor in the audio device's hardware buffer:

  • The write cursor specifies the buffer position into which a DirectSound application can safely write the next sound sample.
  • The play cursor specifies the buffer position of the sound sample that is currently being played by the audio device.
For more information about write cursors and play cursors, see KSAUDIO_POSITION.

For information about using SetPreFetchOffset to control a DirectSound stream's prefetch offset, see Prefetch Offsets.

Requirements

Requirement Value
Target Platform Universal
Header portcls.h (include Portcls.h)
IRQL Any level

See also

IMiniportWavePciStream::GetPosition

IPortWavePciStream::GetMapping

IPreFetchOffset

KSAUDIO_POSITION

KSPROPERTY_AUDIO_POSITION