[wdmaudiodev] Re: Record Buffer Issue

  • From: Yura <spirit@xxxxxxxxxx>
  • To: "David A. Hoatson" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Thu, 16 Sep 2004 18:27:49 +0300

Hello ,David

You can hook IOCTL_KS_PROPERTY in the Dispatch routine and look for
the GET request for the KSPROPERTY_CONNECTION_ALLOCATORFRAMING
property of KSPROPSETID_Connection propery set. In this request you
can modify number of buffers and their sizes (after it has been
processed by lower drivers).

I know, this is bad way, but it helped me when I had problems with
sound recording in MsVad.

Thursday, September 16, 2004, 5:30:39 PM, you wrote:

DAH> I have noticed some specific behaviour for recording that is causing major
DAH> grief for my audio driver
DAH> (IMiniportWavePci/IMiniportWavePciStream).

DAH> For playback, the buffers are chopped up into 10ms increments and it seems
DAH> that a maximum of about 3 buffers are sent down to my driver from the WDM
DAH> port class driver.  If the sample rate scales up, so does the buffer size
DAH> so each buffer is still 10ms in length.  Playback at any sample rate works
DAH> as expected.

DAH> For recording, eight 64-byte buffers are passed in regardless of sample
DAH> rate.  At 48kHz stereo, this means each buffer represents ~0.66ms, which is
DAH> just at the limit of what gives acceptable performance from faster
DAH> machines.  At 192kHz, the port driver still only gives eight 64-byte
DAH> buffers, so now that same buffer only represents 0.166ms for stereo, or
DAH> only 1 sample period for 16 channel interleaved 32-bit (which my device can
DAH> do)!  This means the PC is not able to respond to each interrupt fast
DAH> enough and audio breakup will occur in only 1.3ms (192kHz/Stereo).  This
DAH> essentially means that recording through the port class driver is not
DAH> possible at higher sample rates/higher channel counts.  I should mention
DAH> that I am using Windows XP SP2.

DAH> So far I have found nothing that allows my driver to control the size or
DAH> number of buffers that are passed in from the upper level driver.  Does
DAH> anyone have a solution to this problem?  I'm sure there is something very
DAH> basic that I am missing...

DAH> Thank you,

DAH> David

DAH> ******************

DAH> WDMAUDIODEV addresses:
DAH> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
DAH> Subscribe:   
DAH> mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
DAH> Unsubscribe: 
DAH> mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
DAH> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

DAH> URL to WDMAUDIODEV page:
DAH> http://www.wdmaudiodev.de/



-- 
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: