Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Reality Check: UMDF filter for audio capture

Reply
Thread Tools Display Modes

Reality Check: UMDF filter for audio capture

 
 
Padu
Guest
Posts: n/a

 
      03-05-2009
Hi,

I'm new to device driver programming. The original idea was to write a
filter driver in kernel mode for my application, but now I know enough that
anything kernel mode is not child's play... so if I can stay away from it I
will.

I found that UMDF filter drivers are much safer (and therefore faster to
develop) than KM drivers, so before I dive into learning it, let me check if
what I want to do is feasible.

Basically, I want to tap into the playback stream of an audio device. I've
been doing audio recording for the last decade using the windows multimedia
api, but that only works for the input channels (mic and line in for
example).
The application requirements dictate that not only I have to capture the
audio output from a playback channel, but also mix in audio into it.

Can we do it using UMDF? If yes, what is the catch? How far back can I go in
terms of platform (win2K would be nice, but we are probably willing to
sacrifice it - XP mandatory - in lieu of greater productivity/driver
reliability).

Any help appreciated.

Cheers

Padu

 
Reply With Quote
 
 
 
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      03-05-2009
sorry, can't use UMDF for your task

d

--

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


"Padu" <> wrote in message
news:BE6D2FC8-3267-4841-8CFC-...
> Hi,
>
> I'm new to device driver programming. The original idea was to write a
> filter driver in kernel mode for my application, but now I know enough
> that anything kernel mode is not child's play... so if I can stay away
> from it I will.
>
> I found that UMDF filter drivers are much safer (and therefore faster to
> develop) than KM drivers, so before I dive into learning it, let me check
> if what I want to do is feasible.
>
> Basically, I want to tap into the playback stream of an audio device. I've
> been doing audio recording for the last decade using the windows
> multimedia api, but that only works for the input channels (mic and line
> in for example).
> The application requirements dictate that not only I have to capture the
> audio output from a playback channel, but also mix in audio into it.
>
> Can we do it using UMDF? If yes, what is the catch? How far back can I go
> in terms of platform (win2K would be nice, but we are probably willing to
> sacrifice it - XP mandatory - in lieu of greater productivity/driver
> reliability).
>
> Any help appreciated.
>
> Cheers
>
> Padu


 
Reply With Quote
 
Padu
Guest
Posts: n/a

 
      03-05-2009
Ouch...

Care to elaborate? Any alternative other than a KM filter driver?

Cheers

 
Reply With Quote
 
Doron Holan [MSFT]
Guest
Posts: n/a

 
      03-05-2009
directshow might be an option, I am not familiar enough with the audio
infrastructure to give you a definitive answer

d

--

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


"Padu" <> wrote in message
news:0F5BAF3D-B807-435E-8FE0-...
> Ouch...
>
> Care to elaborate? Any alternative other than a KM filter driver?
>
> Cheers
>

 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      03-06-2009
> Can we do it using UMDF? If yes, what is the catch? How far back can I go in
> terms of platform (win2K would be nice, but we are probably willing to
> sacrifice it - XP mandatory - in lieu of greater productivity/driver


Be prepared for absolutely new audio architecture in Vista+

In Vista+, your only option is to write a user-mode plugin DLL to the central audio process called APO (Audio Processing Object).

In Vista+, the kernel code sometimes does not even sees the audio wave data as IRP+MDL - the DMA buffer of the soundcard's driver is directly mapped to the audio process, it fills the buffer with data and then sends the "production mark advance" message to the kernel land.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
 
Tim Roberts
Guest
Posts: n/a

 
      03-08-2009
"Padu" <> wrote:
>
>Basically, I want to tap into the playback stream of an audio device. I've
>been doing audio recording for the last decade using the windows multimedia
>api, but that only works for the input channels (mic and line in for
>example).
>The application requirements dictate that not only I have to capture the
>audio output from a playback channel, but also mix in audio into it.


Unfortunately, pre-Vista and post-Vista require two completely different
approaches for this.

On XP and before, you can do this with an upper filter on your audio
device. It isn't easy, because you have to intercept and parse the KS
ioctl stream to determine the format and grab the data, but with a KMDF
driver it's not too bad.

On Vista, audio stack is almost completely redesigned. Old drivers still
work, but any HDAudio device (which means most motherboard audio) uses the
WaveRT driver model, where the audio never passes through kernel at all.
Instead, you can write a GFX APO, which is a user-mode DLL that lives in
the special audio engine process. The difficulty there is installation;
it's not hard to do for your own experiments, but it's more difficult for
production. There's a good white paper on the topic here:

http://www.microsoft.com/whdc/device/audio/sysfx.mspx

>If yes, what is the catch? How far back can I go in
>terms of platform (win2K would be nice, but we are probably willing to
>sacrifice it - XP mandatory - in lieu of greater productivity/driver
>reliability).


The filter driver works on 2K and XP. The APO works on Vista and beyond.
--
Tim Roberts,
Providenza & Boekelheide, Inc.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reality check time Part One Ringmaster Windows Vista General Discussion 6 09-22-2008 11:00 PM
Help!! Audio capture filter can not be closed by me ~~~ huengpei Windows Vista Drivers 1 05-09-2005 05:23 AM
About the Filter in Audio Capture Sources Category huengpei Windows Vista Drivers 1 05-03-2005 04:55 AM
Audio Delay From Audio Capture Source Filter huengpei Windows Vista Drivers 0 04-21-2005 04:47 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59