From: Jaydeep on
I am developing virtual audio device driver for Windows XP. I am using MSVAD
sample (Simple) provided in Windows 2003 DDK.

I have made following changes in MSVAD sample
When CopyTo function is called, I put the data to the FIFO buffer, and then
when CopyFrom function is called, I just copy the data from that FIFO buffer.

I have used user mode DirectShow test application to send data to virtual
audio driver and all requests are 1764 bytes long (10ms of sound at 44100
16bit stereo).

DirectShow Graph is like this

Media File Audio --> MSVAD Renderer
MSVAD Capture --> Actual Sound Card Renderer

At the time of capture CopyFrom function is called but with wide range of
buffer size. Buffer size is not fixed and for each call its size is different.

To set buffer size while capturing I have tried using
IAMBufferNegotiation::SuggestAllocatorProperties to set the buffer size to 10
ms (1764 bytes long at 44100 16bit stereo). This is also not working.

While capturing if buffer size is around 1764 audio quality is good other
wise it is very bad.

Is there any way to set buffer size while capturing?

Another problem is about the application which is using this virtual audio
driver, we don't know what it is using for capture, and it may be DirectShow,
DirectSound or WaveAPI's.

How to set buffer size which will work for DirectShow, DirectSound or
WaveAPI's?

Thanks,
Jaydeep.bhalerao(a)gmail.com