[wdmaudiodev] Re: AVStream virtual audio driver: different sound quality dependently on the number of CPU cores.

  • From: Alexander Ivash <elderorb@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 22 Jul 2016 20:51:33 +0300

Thank you Tim,

If this is just a timing issue (although not clear why it doesn't
appear on all the environments) - I'll try to play with delays etc.
Just to check if it makes any difference. And if it makes, I have
another question: using my current approach, what should I do if
Windows is asking me for the data but it is not 'right' time to
provide it? Just specify BytesUsed = 0 and Terminate = false ? Or such
approach will not work at all and I have to return to DPC-based
approach where DPC was doing KsAttemptProcessing at the 'right' time?

Regards, Alexander

2016-07-22 19:51 GMT+03:00 Tim Roberts <timr@xxxxxxxxx>:

Alexander Ivash wrote:
Another possibility - I'm misusing PIN flags. I thought that in my
scenario Windows will take care of frame size & speed of frames
delivery etc. In other words all I need to do - is provide the data
all the time Windows is asking for them. Is it correct or I'm missing
something?

Well, your assumption is incorrect, although it's not immediately clear
that's the source of your problem.  Neither DirectShow nor kernel
streaming does any clock management.  It relies on filters for that.
Windows will feed you empty buffers as soon as they are available.  In
most cases, it expects you -- the source of the data -- to present the
frames in real-time.  For a virtual device, that usually means adding
delays until the simulated time.

In practice, however, you can often inherit pacing from the renderer.
The buffers aren't going to free up until the renderer has shipped them
off, and for a piece of hardware, the renderer is going to be paced by
the buffer sizes in the hardware.

This may provide the source of your experiments for the next few days.

--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

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

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/

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

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: