[wdmaudiodev] Re: usbaudio 4ms in Vista / Win7 myth?

  • From: Matt Gonzalez <matt@xxxxxxxxxxxxx>
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sun, 25 Oct 2009 19:44:41 -0700

I suspect that the 10 msec number is due to both the XP and Vista audio mixers running at a 10 msec native buffer size.


Matt

On Oct 23, 2009, at 10:07 AM, First Last <molley45@xxxxxxxxx> wrote:

Hi,

I have an USB Audio Class device, which I've been using on XP x64 with usbaudio.sys and the asio4all driver. I've been using usbtrace to look at the actual packets to try and determine the actual latencies.

It seems usbaudio.sys always asks for 10 packets at a time (i.e 10ms of data) from the IN endpoint, however, when using the asio4all driver I see that usbaudio can send as little as 1ms at a time, which is great. I understand that usbaudio is still usb 1.0, so anything less than 1ms is not possible given that it cannot support any interval other than 1 (meaning only frames, no microframes for packets).

So I have a couple questions regarding this...

1) Why 10ms only for the input stream? If you take into consideration the round trip latency 10ms input + ~2ms audio processing + 1ms output + (whatever time it actually takes to go up and down the stack), that's like at least 15ms in a best case scenario with usbaudio, no? more? Anyone who plays an instrument, even someone who doesn't know how long 15ms is or how many feet from the speakers that equates to will tell you "that doesn't feel right". Why so much latency on the input stream?

2) I've heard rumors that in Vista / Win7, that it uses packets in groups of 4 instead of 10, or 4ms at a time. How do you get this elusive number? I have a Win7 test machine here, and darned if it doesn't still ask for 10 packets / ms at a time. Is 4ms a myth? How is the NumberOfPackets determined? Is it determined at the kernel level? in usbaudio? or perhaps even in the descriptors of the device? Or is it enforced by DirectSound, or I suppose DirectKS or WaveRT when using ASIO? How do I get that magic number?

Any suggestions welcome, thanks.



Other related posts: