[wdmaudiodev] Re: SFX APO not opened for each playing app

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 16 Apr 2018 16:23:17 +0000

That doesn’t sound like normal SFX behavior. It is normal for an MFX that 
supports a single mode. (You should expect an instance of your MFX for each 
“supported for streaming” mode.)

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> on 
behalf of Johannes Freyberger <jfreyberger@xxxxxxxxxxxxxxxxxxxx>
Sent: Monday, April 16, 2018 8:40:17 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] Re: SFX APO not opened for each playing app

I’m writing logfile entries where I add the current instance number, the this 
pointer of the current CBaseAudioProcessingObject and the calling thread id for 
all calls like Initialize, LockForProcess, GetEffectsList and constructor and 
destructor of my CBaseAudioProcessingObject derived object. And there are no 
overlaps at all – it seems like there’s never more than one instance.

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Montag, 16. April 2018 17:27
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: SFX APO not opened for each playing app

How are you detecting single vs. multiple instances of your APO?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Monday, April 16, 2018 8:23:28 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: SFX APO not opened for each playing app

Yes, I’m setting it to AUDIO_SIGNALPROCESSINGMODE_DEFAULT = 
"{C18E2F7E-933D-4965-B7D1-1EEF228D2AF3}", before I tried with additional values 
of AUDIO_SIGNALPROCESSINGMODE_MOVIE   = 
"{B26FEB0D-EC94-477C-9494-D1AB8E753F6E}" and 
AUDIO_SIGNALPROCESSINGMODE_COMMUNICATIONS = 
"{98951333-B9CD-48B1-A0A3-FF40682D73F7}" as shown in the sysvad sample, which I 
used as starting point.

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Montag, 16. April 2018 17:12
An: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Betreff: [wdmaudiodev] Re: SFX APO not opened for each playing app

Are you also setting PKEY_SFX_ProcessingModes_Supported_For_Streaming? What to?

________________________________
From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> on 
behalf of Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx<mailto:jfreyberger@xxxxxxxxxxxxxxxxxxxx>>
Sent: Monday, April 16, 2018 2:35:50 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: SFX APO not opened for each playing app

Thanks a lot for all your explanations concerning my question to detect the app 
which is using my driver (and thus my SFX APO).

At least my assumption to see several instances of my APO when there are 
multiple apps playing simultaneously seemed to be correct. While I can see one 
instance per playing if I use them one after each other, I can also see only 
one instance in the simultaneous case. Could it be that multiple apps share a 
single stream. I’d have expected this for MFX APOs but not for SFX?

I’m using W10 x64 and it seems to make no difference whether I use 
PKEY_FX_StreamEffectClsid = "{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},5" or 
PKEY_CompositeFX_StreamEffectClsid  = 
"{D04E05A6-594B-4fb6-A80D-01AF5EED7D1D},13" to register my SFX for my audio 
renderer. I also did some tests inside the APOs registry with the parameters 
“MaxInstances”, "MaxInputConnections" and "MaxOutputConnections" but could not 
see any changes in the behavior of how my SFX is loaded.

Already before my first post to this list I’ve seen and loaded the given 
effects discovery app sample, but I unfortunately didn’t get the C++ version 
compiled in VS2017 pro and I finally stopped digging deeper here, as I was not 
sure if it would help me once I have compiled it.

Thanks and best regards,
Johannes

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
<wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx>> Im 
Auftrag von Matthew van Eerde (Redacted sender "Matthew.van.Eerde" for DMARC)
Gesendet: Freitag, 13. April 2018 22:13
An: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Betreff: [wdmaudiodev] Re: AW: Re: SFX APO not opened for each playing app

As of Windows 8.1 (which is also when LFX/GFX became SFX/MFX/EFX) you can use 
the “audio signal processing mode” to do different kinds of processing for 
different kinds of apps (e.g., communications vs. media etc.) This comes in as 
part of the APOInitSystemEffects2 initialization structure.

You cannot detect specific apps.

You need to advertise the specific kinds of effects you are adding in your APO 
(for the given mode) by implementing IAudioSystemEffects2::GetEffectsList. If 
this changes you need to signal the event handle that was passed in.

https://blogs.msdn.microsoft.com/iliast/2016/01/27/windows-8-1-audio-streaming-part-3-audio-processing/<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fblogs.msdn.microsoft.com%2Filiast%2F2016%2F01%2F27%2Fwindows-8-1-audio-streaming-part-3-audio-processing%2F&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C1c139f87b56b468335c708d5a37d8499%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636594681860859928&sdata=rEqOUje%2FY%2BEIFxn6SPReHXFoZW4GT8zVNbcZ5LfWppM%3D&reserved=0>
APOInitSystemEffects2: 
https://msdn.microsoft.com/en-us/library/windows/desktop/dn280314(v=vs.85).aspx<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fdn280314(v%3Dvs.85).aspx&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C1c139f87b56b468335c708d5a37d8499%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636594681860869940&sdata=9setGDRVQmukf9eYuvfp2t1MLVLCC710WzrqPW5zcfY%3D&reserved=0>
IAudioSystemEffects2: 
https://msdn.microsoft.com/en-us/library/windows/desktop/dn280324(v=vs.85).aspx<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fwindows%2Fdesktop%2Fdn280324(v%3Dvs.85).aspx&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C1c139f87b56b468335c708d5a37d8499%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636594681860879945&sdata=VRvlN5qx%2BYSzxzY%2FD6DF%2BdleAssr13VhgfBxt2Kf%2FtU%3D&reserved=0>

You should expect one instance of the APO for every audio stream (an app might 
create multiple streams), plus potentially another instance if any apps query 
the effects.

There’s a sample effects discovery app here: 
https://code.msdn.microsoft.com/windowsapps/Audio-effects-discovery-5fd65c15<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcode.msdn.microsoft.com%2Fwindowsapps%2FAudio-effects-discovery-5fd65c15&data=02%7C01%7CMatthew.van.Eerde%40microsoft.com%7C1c139f87b56b468335c708d5a37d8499%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636594681860879945&sdata=1YnR6hXWxy4JaWuHVThpYlbJcSMgndq6d%2BLJ31aNq6k%3D&reserved=0>

Other related posts: