Hi,
1)
I want to capture all the audio out on my machine .
What i understand is that if the sound card on my machine provides
"stereo
Mix" capability AND I am not recording something on the physical line
in
of my sound card , then and only then i can capture the audio out
going
through the sound card using DirectSound or WaveIn API.

what is the most reliable way to do this that should work on Win 9x+
and Win
2k+ , independent of whether the sound card supports stereo mix or
whether
something is also being recorded in the physical line in of the sound
card?

Is there some way to generically install an upper filter driver on top
of the
sound card driver and do this?
what other option should help here?
In the DDK i have a Microsoft Virtual Audio Driver , will that be of
use ?
There are multiple drivers inside the MSVAD driver directory, which one
can
i use with minimum amount of code change that should achieve my purpose
?
and if i do need to change the code , which portion needs to be changed
?


2)
I was going through the code of MSVAD and its architecture looks
different
from the standard WDM drivers ( particularly WDM USB client drivers ).
No Read/Write Dispatchers etc.
also Walter Oney's Book apparently does not delve into sound card
drivers as
well. What is the best resource to get more information about this ,
apart
from the DDK ?

thanks and regards
Taha

Re: what io the Best method to capture all audio out? by Max

Max
Sun Jan 09 16:40:20 CST 2005

You can't. Not in the clean way that is.

This topic has been discussed here multiple times and the conclusion is that
you would need to filter audio card FDO, which is the KS based thing.
Communication between KS and the user land is totally undocumented so
writing a filter means a lot of reverse engineering to cover current state
of DX. With the next spin of OS things are likely to break.
So you could spend 3-4 months doing this (or more depending on your
skillset) and make it work on most hardware on most common OS
configurations. But that would be the best result, which is certainly not
enough if you are considering putting this in a product.

I can imagine that you could achieve what you want by writing a virtual
sound driver and disabling current audio card. In that case all audio
would've flown your way and you could do with it anything you want. Problem
with this approach is that the machine will stay mute.

-- Max.



"M Taha Masood" <m.tahamasood@gmail.com> wrote in message
news:1105283405.754274.312810@c13g2000cwb.googlegroups.com...
> Hi,
> 1)
> I want to capture all the audio out on my machine .
> What i understand is that if the sound card on my machine provides
> "stereo
> Mix" capability AND I am not recording something on the physical line
> in
> of my sound card , then and only then i can capture the audio out
> going
> through the sound card using DirectSound or WaveIn API.
>
> what is the most reliable way to do this that should work on Win 9x+
> and Win
> 2k+ , independent of whether the sound card supports stereo mix or
> whether
> something is also being recorded in the physical line in of the sound
> card?
>
> Is there some way to generically install an upper filter driver on top
> of the
> sound card driver and do this?
> what other option should help here?
> In the DDK i have a Microsoft Virtual Audio Driver , will that be of
> use ?
> There are multiple drivers inside the MSVAD driver directory, which one
> can
> i use with minimum amount of code change that should achieve my purpose
> ?
> and if i do need to change the code , which portion needs to be changed
> ?
>
>
> 2)
> I was going through the code of MSVAD and its architecture looks
> different
> from the standard WDM drivers ( particularly WDM USB client drivers ).
> No Read/Write Dispatchers etc.
> also Walter Oney's Book apparently does not delve into sound card
> drivers as
> well. What is the best resource to get more information about this ,
> apart
> from the DDK ?
>
> thanks and regards
> Taha
>



Re: what io the Best method to capture all audio out? by M

M
Mon Jan 10 07:23:37 CST 2005

I guess , in that case writing a filter driver to achieve this would
seem to be totally out of question

> I can imagine that you could achieve what you want by writing > a
virtual sound driver and disabling current audio card. In that
> case all audio would've flown your way and you could do with it >
anything you want. Problem with this approach is that the
> machine will stay mute.

in case i write a virtual audio driver , i can select this as the
driver in my app and would then be ready to get the audio ? is there
any sample app showing similar stuff in the DDK ? And how much would i
have to change in the MSVAD sample driver to accomplish this?
also what is the best resource/book for audio driver programing on
windows platform?

thanks
Taha


Re: what io the Best method to capture all audio out? by Chris

Chris
Mon Jan 10 07:36:39 CST 2005

On 10 Jan 2005 05:23:37 -0800, M Taha Masood wrote:

> I guess , in that case writing a filter driver to achieve this would
> seem to be totally out of question
>
>> I can imagine that you could achieve what you want by writing > a
> virtual sound driver and disabling current audio card. In that
>> case all audio would've flown your way and you could do with it >
> anything you want. Problem with this approach is that the
>> machine will stay mute.
>
> in case i write a virtual audio driver , i can select this as the
> driver in my app and would then be ready to get the audio ? is there
> any sample app showing similar stuff in the DDK ? And how much would i
> have to change in the MSVAD sample driver to accomplish this?
> also what is the best resource/book for audio driver programing on
> windows platform?

A virtual audio driver is the way to go in this case, but certainly not
trivial. With a user mode component to go along with the driver it would
even be possible to pass the data along to another real sound card. I
don't see any need to disable other sound cards, simply setting the virtual
one as the default should be enough.

I believe all the information you would need is in the DDK, I haven't
studied the MSVAD sample so I'm not sure how close it is to the task.

I haven't seen any books that concentrate on audio drivers, but I think I
would focus on a book that covers WDM in detail.

Re: what io the Best method to capture all audio out? by Max

Max
Tue Jan 11 03:36:21 CST 2005

The reason I mentioned disabling sound card is that I recall seeing people
struggling in making their sound card a default choice for all Windows apps.
I am not a sound driver guy, so I can't comment on this. I just remember
that the subject is not trivial and caused problems to others.

To OP: no, there is no books on the subject. This area is too narrow to
justify writing even a chapter about it in a driver book.

-- Max.



"Chris P. [MVP]" <msdn@chrisnet.net> wrote in message
news:wgd3r0hhl367$.i8p5dw38aswr.dlg@40tude.net...
> On 10 Jan 2005 05:23:37 -0800, M Taha Masood wrote:
>
>> I guess , in that case writing a filter driver to achieve this would
>> seem to be totally out of question
>>
>>> I can imagine that you could achieve what you want by writing > a
>> virtual sound driver and disabling current audio card. In that
>>> case all audio would've flown your way and you could do with it >
>> anything you want. Problem with this approach is that the
>>> machine will stay mute.
>>
>> in case i write a virtual audio driver , i can select this as the
>> driver in my app and would then be ready to get the audio ? is there
>> any sample app showing similar stuff in the DDK ? And how much would i
>> have to change in the MSVAD sample driver to accomplish this?
>> also what is the best resource/book for audio driver programing on
>> windows platform?
>
> A virtual audio driver is the way to go in this case, but certainly not
> trivial. With a user mode component to go along with the driver it would
> even be possible to pass the data along to another real sound card. I
> don't see any need to disable other sound cards, simply setting the
> virtual
> one as the default should be enough.
>
> I believe all the information you would need is in the DDK, I haven't
> studied the MSVAD sample so I'm not sure how close it is to the task.
>
> I haven't seen any books that concentrate on audio drivers, but I think I
> would focus on a book that covers WDM in detail.