[wdmaudiodev] Re: Mixing applications audio stream in driver

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Wed, 6 Feb 2019 08:57:55 +0000

For questions about the session manager APIs I refer you to the Windows Pro 
Audio Application Development forum 
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/home?forum=windowspro-audiodevelopment
 or to StackOverflow.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of eno rocky <binoddummy@xxxxxxxxx>
Sent: Tuesday, February 5, 2019 5:58:54 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: Mixing applications audio stream in driver

Wow Thanks, that was really helpful Mathew.

I was able to do lots of thing with that.
Except RegisterDuckNotification for IAudioSessionManager2  returns OK but 
notification never get called.

Thanks,



On Tue, Feb 5, 2019 at 10:30 PM Matthew van Eerde 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>> wrote:
You don’t need to write a driver to control application volume. There’s an API 
for that.

https://blogs.msdn.microsoft.com/matthew_van_eerde/2013/09/26/getting-peak-meters-and-volume-settings-for-all-apps-and-audio-devices-on-the-system/<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblogs.msdn.microsoft.com%2Fmatthew_van_eerde%2F2013%2F09%2F26%2Fgetting-peak-meters-and-volume-settings-for-all-apps-and-audio-devices-on-the-system%2F&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C579a5c59d5374bb79b4208d68c04dddb%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636850349912941308&sdata=VSd0VNYDwbk%2BjpNRrSxos48zMP92RepQKS1605xZVBE%3D&reserved=0>

There’s also already UI in Windows that users can use to control application 
volume.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of eno rocky <binoddummy@xxxxxxxxx<mailto:binoddummy@xxxxxxxxx>>
Sent: Tuesday, February 5, 2019 6:32:50 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Mixing applications audio stream in driver

Hi,

Thank you for clarification that was clear.

The main purpose of it was to gain control over each application stream volume.
As I don't think we can override the application volume in driver either.

Thanks,

On Tue, Feb 5, 2019, 3:36 PM Matthew van Eerde 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx> wrote:
Since Windows Vista, no.

Windows mixes audio from all the applications together (inside the “user-mode 
audio engine”) and hands the result of the mix to the audio driver, which is 
expected to hand it directly to the digital-to-analog converter without further 
mixing.

(It’s actually a little more complicated than that, but that’s the basic idea.)

But what are you really trying to do? Suppose I had said “yes”. What is your 
scenario? Why do you want to mix inside an audio driver?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of eno rocky <binoddummy@xxxxxxxxx<mailto:binoddummy@xxxxxxxxx>>
Sent: Monday, February 4, 2019 8:47:29 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Mixing applications audio stream in driver

Hi,

When multiple applications sends audio stream, global mixer is mixing audio.
Is there a way to mix it inside driver. Can driver do that?

Thanks,

On Mon, Feb 4, 2019, 10:31 PM Matthew van Eerde 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx> wrote:
Sorry, but I don’t follow what you’re trying to do. Can you elaborate? Maybe 
draw some audio flow diagrams?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of eno rocky <binoddummy@xxxxxxxxx<mailto:binoddummy@xxxxxxxxx>>
Sent: Monday, February 4, 2019 4:59:32 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Mixing applications audio stream in driver

Hi,

lets forget about kmixer.sys.
What about KSCATEGORY_MIXER ? Can it be used for getting separate application 
stream and later mix on my own?
Or, is there any other way ?

Thanks,



On Mon, Feb 4, 2019 at 5:52 PM Matthew van Eerde 
<dmarc-noreply@xxxxxxxxxxxxx<mailto:dmarc-noreply@xxxxxxxxxxxxx>> wrote:
Whatever MSDN document you found should be removed; kmixer.sys hasn’t existed 
since Windows XP.

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of eno rocky <binoddummy@xxxxxxxxx<mailto:binoddummy@xxxxxxxxx>>
Sent: Sunday, February 3, 2019 9:59:33 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Mixing applications audio stream in driver

Hi,

According to msdn document, I found Kmixer.sys does mixing and gave back mixed 
data stream through IMiniportWaveRTStream
Is there any way to mix it in driver.
I found KSCATEGORY_MIXER in ks.h, what does it really do? Is it the one for 
each application stream mixing?
Also I found term hardware mixing. What mixing it refers to?
I am working on virtual driver.

One more thing can we override the volume control of each application like 
master/Endpoint volume in driver?

Thanks,

Other related posts: