views:

346

answers:

2

Hello

How to write simpliest audio virtual device driver in WinXP? I know that one way is to write a WDM driver but I suppose it is not an easyly task. I need to implement some audio filtering for a Flash based application. Unfortunatelly it seems that it is the only way to do it - outside a Flash, by a device driver, then a Flash app can attach to my virtual device. I was wondering if I can write a device driver using some high level API (higher that WDM), maybe UMDF as virtual usb audio device(?) or maybe only some dll which will register a virtual device. As I can see Google Talk plugin contain googleadapter.dll which provfides virtual webcams, I wonder how they wrote it.

Thanks in advance, ternyk

+1  A: 

For WinXP it is enough to write Installable Driver which is a simple user-mode dll. However it will not work under Vista or higher because they have different audio model.

Sergius
OK, thanks for a quick reply! How about Vista and higher? Could it be done also in a simplified way?
ternyk
You could try to use API hooking.
Sergius
Could you elaborate on API hooking? What API?
Presidenten
There are many places can be hooked (depends on your goals). Look at Wave API (waveOutGetNumDevs, waveOutOpen and etc), DirectSound API (DirectSoundCreate) and MMDevice API (CLSID_MMDeviceEnumerator). Use a debugger to get more info.
Sergius
appears that you can use user-mode drivers in vista, you just can't use them as the default devices (?) http://www.totalrecorder.com/Vista_and_TR_user_mode_driver.htm
rogerdpack
Yes, but it works only for Wave API :(
Sergius
A: 

What API? First thing i'd worry about is learning how the app(s) interface with Windows and the best way to do this is to actually learn how to code an application with audio using the same interface. So, if it uses DirectSound audio, learn how to code an application which uses DirectSound.

The reason i say this is that once you know how your code works you will also know what API need to be hooked. Then it goes from there, code the loader/dll injector so that it performs what you're after.

Finally, don't forget to use Google to do as much research on your own first:

[quote]Give a man a fish, he'll eat for a day... Teach a man to fish and he'll never go hungry again...[/quote]

Bob the Builder
Light a man a fire and he will be warm for a day, Light a man afire and he will be warm for the rest of his life ;)
Yarek T