[wdmaudiodev] Re: How to filter microphone voice?

  • From: "Sam Tertzakian" <sam@xxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 26 Jun 2009 02:44:29 -0700

Yes, OK, I see what you mean...

 

In this case, I *think* you record audio from the physical device and then play 
it on your virtual audio device. When your virtual audio device receives the 
data that would be played, you modify the data in the buffers. Then the virtual 
audio device can write the modified audio data to a file or somehow transfer 
the data to another program that plays the modified data.

 

I need to think about it a bit...To me the filter driver is easier to think 
about. But, MSVAD can be used to do what you want too.

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of kevinrich47
Sent: Thursday, June 25, 2009 10:10 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: How to filter microphone voice?

 

Thank you Sam,

I only need to change the microphone input voice(for default input device),

I found some thread on other forum/list say that modify 
CMiniportWaveCyclicStreamMSVAD::CopyFrom function of MSVAD sample can do this 
job,

what do you think?

also,Could you please  take look at"av voice changer" software?

this product are very much the same with my new product.

 

after installed that product,Open Device manager -> Sound,Video and Game 
Controller -> Avnex Virtual Audio Device -> Properties -> Driver -> Driver 
Details

 

in Driver files, from top to bottom there is

 

drmk.sys

ks.sys

portcls.sys

stream.sys

vcsvad.sys (important)

ksproxy.ax

ksuser.dll

wdmaud.drv

 

 

if you open the MSVAD(simple) properties,

this sequence will be same except the vcsvad.sys line changed to vadsimpl.sys,

so,I think that driver is base on MSVAD.

 

 

 

                                                Thank you  very much.

----- Original Message ----- 

From: Sam Tertzakian <mailto:sam@xxxxxxxxxxx>  

To: wdmaudiodev@xxxxxxxxxxxxx 

Sent: Friday, June 26, 2009 11:39 AM

Subject: [wdmaudiodev] Re: How to filter microphone voice?

 

Hi,

 

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.

 

Keep in mind the following:

 

1. This architecture will work for 2000/XP/Vista/Windows 7. The same binary 
should work.

2. This driver is a WDM Filter Driver. Do not  confuse this with a DirectShow 
filter which is unrelated to this.

3. Because it is WDM Filter Driver, it is not an "audio driver" per se, as it 
is a straight filter driver. So, the information that is relevant in the DDK is 
in two places: a) WDM Filter Drivers b) Kernel Streaming Drivers. You need b) 
because the data format passed in the IRPs is passed from KS so you need to 
understand the data formats in the IRPs.

 

I can tell you with certainty that all of what I am saying works, because I 
have personally done this. 

 

One more thing...what you want to do is not trivial. There are some details I 
left out. For example, when you receive data buffers, they just contain audio 
data. But, buffers themselves have no information about things like: how many 
channels are being processed, how many bits/bytes per sample and the sample 
rate. So, some of the requests that go through your driver, while they remain 
unmodified as you pass them down, must be read by your driver and tracked so 
that you know when a device is opening and closing, and what parameters are 
used to open the device. There are also other technical details such as: you 
will need to properly lock down the memory before you read and write to it in 
some cases, but not all...if I recall the buffers passed are of the type 
METHOD_NEITHER, which requires special attention.

 

If you need some help along your journey, I am willing to help; as I am sure 
others here are. It is not an easy task; but, once you complete it, I am sure 
you will be very proud of your achievement.

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of kevinrich47
Sent: Thursday, June 25, 2009 7:05 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: How to filter microphone voice?

 

Hi,Could you please tell me which technology in Microsoft is the best choice to 
implement a voice changer?Thank you .

 

----- Original Message ----- 

From: Frank <mailto:Frank.Yerrace@xxxxxxxxxxxxx>  Yerrace 

To: wdmaudiodev@xxxxxxxxxxxxx 

Sent: Friday, June 26, 2009 9:29 AM

Subject: [wdmaudiodev] Re: How to filter microphone voice?

 

Note that the only appropriate way to distribute an LFX is as part of a 
complete audio driver package. Of course, if this is just for 
experimentation/proof of concept then do whatever you want.

 

Frank Yerrace

Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

 

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx 
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: Thursday, June 25, 2009 5:42 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: How to filter microphone voice?

 

kevinrich47 wrote: 

Thank you Tim,What I want is not change voice for single app,but for all 
application on the machine,

I have consider Virtual Audio Cable,But the price is not affordable for me.


Oh, come on!  There's a free version with some features limited for you to try 
out, and the full version is only $30.  If you have not done audio drivers 
before, it will save you MONTHS of frustration.

If you are working on Vista, you can write a Local Effects Audio Processing 
Object (LFX APO) to do this.  This is a user-mode DLL that lives in the the 
audio engine process.  There is a sample in the WDK in src\audio\sysfx.  It's a 
little bit tricky to get one installed to begin with, but there are documents 
available to help with that.

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

Other related posts: