[wdmaudiodev] KSPROPERTY_AUDIO_POSITION in a looped streaming

  • From: Eugene Muzychenko <eugene@xxxxxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 16 Nov 2011 00:52:30 +0700

Hello!

For many years, MSDN documentation says the following:

If the client buffer is looped (that is, the stream type is
KSINTERFACE_STANDARD_LOOPED_STREAMING), PlayOffset and WriteOffset are
buffer-relative offsets. That is, they are specified as byte offsets
from the start of the looped client buffer. When either offset
increments to the end of the buffer, it wraps around to the start of
the buffer. (The offset at the start of the buffer is zero.) Thus,
neither offset ever exceeds the buffer size.

http://msdn.microsoft.com/en-us/library/windows/hardware/ff536211(v=vs.85).aspx

But using a legacy (via IOCTL_KS_WRITE_STREAM) looped streaming mode
from an application to PortCls-assisted drivers, I see that PlayOffset
increases only during a first buffer loop then stops at a buffer size
value. On the contrary, WriteOffset continues increasing during next
loops, reaching 2x, 3x of a buffer size, and so on.

Reproduced with PortCls under XP SP3 and Win7.

Additionally, looping mode is triggered only by the
KSSTREAM_HEADER_OPTIONSF_LOOPEDDATA flag regardless of
KSINTERFACE_STANDARD_LOOPED_STREAMING or
KSINTERFACE_STANDARD_STREAMING was used in KSPIN_CONNECT.

Where is the bug: in the documentation or in PortCls?

Regards,
Eugene

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.com/

Other related posts:

  • » [wdmaudiodev] KSPROPERTY_AUDIO_POSITION in a looped streaming - Eugene Muzychenko