The KSPROPERTY_AUDIO_POSITIONEX property provides the caller with the stream position and the associated timestamp information for a kernel streaming (KS)-based audio driver.

Usage Summary Table

GetSetTargetProperty descriptor typeProperty value type







The property value (operation data) is a structure of type KSAUDIO_POSITIONEX that receives the position information from the property handler. The position information that is specified by the KSAUDIO_POSITIONEX structure is the position information for the pin that was selected by the caller.

Return Value

The KSPROPERTY_AUDIO_POSITIONEX property request returns S_OK if the call was successful. Otherwise, it returns the appropriate HRESULT error code.


Typically, audio applications must monitor the current position of an audio stream. This position is specified as a byte offset from the beginning of the stream. There are two possible interpretations of the stream position information:

  • In the case of a rendering stream, the stream position is the byte offset of the audio frame that is currently playing through the digital-to-analog converters (DACs).

  • In the case of a capture stream, the stream position is the byte offset of the audio frame that is currently being recorded through the analog-to-digital converters (ADCs).

A driver that supports the KSPROPERTY_AUDIO_POSITIONEX property generates a timestamp window for the stream position value. The timestamp window is the interval between the timestamp that is sampled before stream position is determined and the timestamp that is taken after the stream position is determined. The caller then determines whether it can use the timestamp window.



Available in Windows Vista and later versions of Windows.


Ksmedia.h (include Ksmedia.h)

See also




Send comments about this topic to Microsoft