[wdmaudiodev] MSVAD and WDM capture

  • From: Yura <spirit@xxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Mon, 14 Jun 2004 19:05:37 +0300

Hello to all audio people!

I have a problem which I struggle with for about a month now. Hope you
can help me.

I'm using the MSVAD sample as a base for my sound capture driver. I
create two virtual sound cards which are connected to each other in
such way: fist input->second output & second output -> first input.
So, if you have two apps they can speak to each other.

When CopyTo is called on the one sound card, I put the data to the
FIFO buffer, then when CopyFrom is called on the other sound card, I
just copy the data from that FIFO buffer.

This works great with apps that use wave* APIs. But it does not work with
DirectSound apps which use WDM capture and WDM render. Capture side
sometimes doesn't get all the available sound data, so FIFO gets
overflowed and I get clicking, skippy sound (it sometimes sounds like
lownmower you know :)). I've noticed that the sound quality highly depends
on processor load, i.e. when I scroll some text with the scroller on
my mouse, the sound becomes horrible, but when I don't touch anything
the sound is almost good (only skips about once per few seconds).

After some investigation I found that KSPROXY.AX filter sends 
IOCTL_KS_READ_STREAM
requests to my driver in some strange way (I think it's strange for
streaming). It sends one ioctl once after each Notify() call in my
driver. All requests are 1764 bytes long (this equals to 10ms of sound
at 44100 16bit stereo). And sometimes when processor is loaded, it
does not send that ioctl at all and here I get sound skip.

So, my question is how to tell KSPROXY to send several IOCTLs
beforehead to avoid skips? Or is there any property that I should set
for my driver?

Thank you all!


-- 
Best regards,
 Yura                          mailto:spirit@xxxxxxxxxx

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

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.de/

Other related posts: