[wdmaudiodev] Re: [EXTERNAL] DownMixing APO (Multichannel to Stereo)

  • From: Matthew van Eerde <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 19 Jan 2021 17:48:44 +0000

You can do this in a render SFX APO.

Whether the application takes advantage of it is up to the app. In particular 
if the app calls IAudioClient::IsFormatSupported with the eight-channel format 
then it will use your custom downmix; if not, it won’t. It’s the app’s decision.

More on this here: How to negotiate an audio format for a Windows Audio Session 
API (WASAPI) 
client<https://matthewvaneerde.wordpress.com/2017/10/17/how-to-negotiate-an-audio-format-for-a-windows-audio-session-api-wasapi-client/>

Many apps use higher-level audio APIs that wrap WASAPI (e.g. Media Foundation.) 
In such cases the higher-level API will often take care of this kind of thing 
on the app’s behalf. (This is one of many good reasons to use higher-level 
APIs.)

From: Shubham Kumar<mailto:shubham.kumar.sci@xxxxxxxxx>
Sent: Tuesday, January 19, 2021 9:39 AM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [EXTERNAL] [wdmaudiodev] DownMixing APO (Multichannel to Stereo)

Hi,
I'm trying to implement a APO, which can process 8 channel data and send 2 
channel to the endpoint. I am trying to process the downmixing in the APO 
itself.
I have few doubts:


  *   Is it possible to let audio client application know to send 8 channel 
data, despite the endpoint being set to 2 channels.
  *   While experimenting with 
sysvad<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FWindows-driver-samples%2Ftree%2Fmaster%2Faudio%2Fsysvad&data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C125af4fc66d8491b827f08d8bca11931%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637466747853458092%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QOb45iQpoX%2FQtEA3vUpzIZ5tu03jU7Yph6oJ5cXV02I%3D&reserved=0>
 code,

     *   I found two functions 
IsInputFormatSupported<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fapi%2Faudioenginebaseapo%2Fnf-audioenginebaseapo-iaudioprocessingobject-isinputformatsupported&data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C125af4fc66d8491b827f08d8bca11931%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637466747853468088%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=nLmqecKaCL%2BUD2befkJSYdveZRTi65tkYxVyckweCqg%3D&reserved=0>
 and 
IsOutputFormatSupported<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fapi%2Faudioenginebaseapo%2Fnf-audioenginebaseapo-iaudioprocessingobject-isoutputformatsupported&data=04%7C01%7CMatthew.van.Eerde%40microsoft.com%7C125af4fc66d8491b827f08d8bca11931%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637466747853468088%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3ZrDSG63znM9j9XBe%2FreWoisMLnSLJwwaEkTguQMI04%3D&reserved=0>.
 It appears that the first one should be used to tell the client to render 8 
channel audio, And the second one should verify for 2 channel audio. Is it the 
correct understanding ?
     *   What is the proper way to handle format negotiation in apo for such 
cases? Or Is there a different approach to be followed ?

Thanks,
SK

Other related posts: