[wdmaudiodev] Re: How to filter microphone voice?

  • From: Tim Roberts <timr@xxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Fri, 26 Jun 2009 09:46:58 -0700

Sam Tertzakian wrote:
> If you want to change the audio for all possible streams/devices under
> 2000/XP, then the best choice is a WDM "lower filter" driver that sits
> under KS.sys. The driver will pass all requests unmodified. However,
> for reads and writes it will modify the data. For writes, your driver
> will receive a WRITE IRP and will modify the data (change voice) and
> then submit the same IRP with modified data down to the next driver in
> the stack. For READ IRPS it will set a completion routine, then pass
> the IRP down to the next driver in the stack. When the lower driver
> has filled the IRP's buffer with audio, the IRP will arrive in your
> completion routine. There you may modify the data that was read and
> then complete the IRP which will send it to the application.
>  ...
> I can tell you with certainty that all of what I am saying works,
> because I have personally done this.

Yes, me, too.  This is good advice.  I would also point out that you can
write this filter using KMDF, which makes the process of writing a
filter driver much easier.  You still have to worry about the details of
handling IOCTL_KS_READ and IOCTL_KS_WRITE requests, but you don't have
to worry about power and PnP and the read of the boilerplate.

> One more thing...what you want to do is not trivial. There are some
> details I left out.

This is ALSO 100% correct...  ;)

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

Other related posts: