[wdmaudiodev] Different amount of data in CopyFrom and CopyTo functions with same audio format.

  • From: Michail Nikolaev <michail.nikolaev@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Wed, 27 May 2009 01:17:01 +0400

I develop analog of Virtual Audio Cable. It is put all output data(from
CopyTo) to cyclic (big)buffer. Then at CopyFrom puts data from buffer do
output(capture stream).
All streams(one capture and one render) supports only one format(the same.
44100, 16 bit).
CopyFrom and CopyTo function tries to synchronize theirs work (if there is
no data in buffer, or no space) by little delays.
When i use Winamp to render sound to my virtual device and stdrec32.exe to
record sound from my device - all works fine. Sound without bugs and buffer
is synchronized between CopyTo and CopyFrom functions.

But when I use Windows Media Player - ~every second CopyFrom function can't
read data for capture stream(there is no ~184 bytes). CopyFrom function
tries to wait data(for example - 10 times by 10 ns) - but there is no

How it possible? Looks like CopyTo function receives less data than CopyFrom
tries to load(with same format, one-time).

Sorry for pure English.

Other related posts: