[wdmaudiodev] Delay between record and play (10 ms) in Vista

  • From: Chinmay Mahata <chinmay.mahata@xxxxxxxxx>
  • To: wdmaudiodev <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 9 Feb 2009 15:11:33 +0530

Dear All,

During simultaneous play and record in windows Vista with our driver and
application we found that record device starts before the play device. And
the difference is 10 millisecond, which is significant for our
application. (In XP, this driver and application pair works fine with a
delay of only 1ms.)

Our driver is a WDM wavePci driver for Vista.

In application we did the follwoing steps.

OpenAuido(): WaveInOpen - Port1
OpenAuido(): WaveOutOpen - Port0

StopPlay(): waveOutReset - Port 0
StopRecord(): waveInReset - Port 1

StopPlay(): waveOutReset - Port 0

EnablePlay(): Prepared Header - Port 0
EnablePlay(): waveOutPause - Port 0
EnablePlay() waveOutWrite - Port 0
EnablePlay(): waveOutPause - Port 0

EnableRecord(): waveInStop() - Port 1
EnableRecord(): Prepared Header - Port 1
EnableRecord(): waveInAddBuffer - Port 1

RestartPlay(): waveOutRestart - Port 0
StartRecord(): waveInStart - Port 1

*DeviceControl DSP_StartAll    // Our driver does not start DSP at RUN
                              // So we start the DSP using this IOCTL to
                              // all open device start play and record at
the same time.
OnPlayComplete(): waveOutUnprepareHeader - Port 0
OnPlayComplete(): waveOutReset - Port 0
OnRecordComplete(): waveInUnprepareHeader - Port 1

OnRecordComplete(): waveInReset - Port 1
OnRecordComplete(): waveInStop - Port 1

StopPlay(): waveOutReset - Port 0

We are completely in dark why the delay or who is causing the delay.
Can anyone please let us know how we can remove or minimize the delay of

Thanks in advance.

Best regards,

Other related posts:

  • » [wdmaudiodev] Delay between record and play (10 ms) in Vista - Chinmay Mahata