[wdmaudiodev] Re: Multichannel audio USB support

  • From: "Matthew van Eerde" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "Matthew.van.Eerde" for DMARC)
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Mon, 12 Dec 2016 23:42:35 +0000

What is the terminal type in KSPIN_DESCRIPTOR.Category?

From: Edward Abramian<mailto:edwabr123@xxxxxxxxx>
Sent: Monday, December 12, 2016 3:22 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

Bumping this thread in case anyone knows how to enable “Configure” button for 
accessing Speaker Setup control panel. In my driver based on wdma_usb.inf it’s 
grayed out. Any hint will be appreciated.

From: Edward Abramian [mailto:edwabr123@xxxxxxxxx]
Sent: Friday, December 2, 2016 4:37 PM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: RE: [wdmaudiodev] Re: Multichannel audio USB support

Removing APO_FLAG_SAMPLESPERFRAME_MUST_MATCH helped. Now I receive 6 channels 
in IsInputFormatSupported. Thanks for helping with this.

I noticed that “Configure” button for my USB device is grayed out. So, I can’t 
select preferable speaker configuration (Stereo, Quad, 5.1 etc) in Speaker 
Setup control panel. I guess there should be something I need declare in my 
.inf to make supported speaker configurations available for user to choose from?

Thank you again for your great help!

From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, December 2, 2016 3:43 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

Try using TopoEdit.exe 
https://msdn.microsoft.com/en-us/library/windows/desktop/ff485862(v=vs.85).aspx

Set a breakpoint on your IAudioProcessingObject::IsInputFormatSupported 
implementation

If you’re using CBaseAudioProcessingObject, you will need to modify your flags. 
The default flags have APO_FLAG_SAMPLESPERFRAME_MUST_MATCH. This will reject 
any attempt to pair an input format and an output format with a different 
number of channels.

// audioenginebaseapo.h

enum APO_FLAG
    {
        APO_FLAG_NONE   = 0,
        APO_FLAG_INPLACE              = 0x1,
        APO_FLAG_SAMPLESPERFRAME_MUST_MATCH      = 0x2,
        APO_FLAG_FRAMESPERSECOND_MUST_MATCH      = 0x4,
        APO_FLAG_BITSPERSAMPLE_MUST_MATCH              = 0x8,
        APO_FLAG_MIXER = 0x10,
        APO_FLAG_DEFAULT            = ( ( APO_FLAG_SAMPLESPERFRAME_MUST_MATCH | 
APO_FLAG_FRAMESPERSECOND_MUST_MATCH )  | APO_FLAG_BITSPERSAMPLE_MUST_MATCH )
    }          APO_FLAG;

From: Edward Abramian<mailto:edwabr123@xxxxxxxxx>
Sent: Friday, December 2, 2016 3:36 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

I keep receiving stereo in my SFX even if I play 5.1 audio file. Is there 
something I need to expose in my .inf file to tell Windows that my USB device 
supports multichannel input?

From: Edward Abramian [mailto:edwabr123@xxxxxxxxx]
Sent: Friday, December 2, 2016 2:38 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: RE: [wdmaudiodev] Re: Multichannel audio USB support

Will do. Thanks!

From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, December 2, 2016 2:04 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

Also, make sure to implement 
IAudioSystemEffects2::GetEffectsList<https://msdn.microsoft.com/en-us/library/windows/desktop/dn280325(v=vs.85).aspx>
 and report AUDIO_EFFECT_TYPE_VIRTUAL_SURROUND, 
AUDIO_EFFECT_TYPE_VIRTUAL_HEADPHONES, and/or other effects types as appropriate 
so that apps are aware of the processing you’re doing.

From: Edward Abramian<mailto:edwabr123@xxxxxxxxx>
Sent: Friday, December 2, 2016 1:39 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

Thank you for clarifying this for me. I will try you recommendations.

Have a great weekend!
Edward

From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Matthew van Eerde ;
(Redacted sender "Matthew.van.Eerde" for DMARC)
Sent: Friday, December 2, 2016 1:33 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

I see, you want to provide custom downmixing.

You can do this by implementing an SFX APO that supports both stereo and 
multichannel input, and always outputs stereo. Your driver package will have an 
.inf and a .dll in it; no need for a custom .sys.

Media players will call IAudioClient::IsFormatSupported(…) with the source 
content. If the source is multichannel, this will succeed, and your custom 
downmixing will be in effect.

(To be complete, I will mention that whether IAudioClient::IsFormatSupported is 
called depends on the particular API the app is using to stream. Some legacy 
APIs will open in the mix format regardless of the source content. For those 
apps, your SFX will be opened in stereo mode.)

From: Edward Abramian<mailto:edwabr123@xxxxxxxxx>
Sent: Friday, December 2, 2016 1:27 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

The resulting audio device will support multichannel input through downmixing 
it into stereo in SFX. The downmixing is done the way it preserves sound 
localization by use of binaural/HRTF techniques. So apps are free to choose 
multichannel output on that device.

From: wdmaudiodev-bounce@xxxxxxxxxxxxx<mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx
[mailto:wdmaudiodev-bounce@xxxxxxxxxxxxx] On Behalf Of Tim Roberts
Sent: Friday, December 2, 2016 1:22 PM
To: wdmaudiodev@xxxxxxxxxxxxx<mailto:wdmaudiodev@xxxxxxxxxxxxx>
Subject: [wdmaudiodev] Re: Multichannel audio USB support

Edward Abramian wrote:

To be clear on what exactly I need, let me describe it from the user 
perspective. I want a USB audio device to show up as supporting multichannel 
input, such as 5.1 or 7.1, so that user can configure it from Speaker Setup 
control panel. Internally, per my understanding, this will mean downmixing 
multichannel input into stereo in SFX to match USB headset stereo output.

If the hardware does not support 5.1 or 7.1, why would you want to pretend that 
it does?  That's just going to produce a confusing user experience.  Apps will 
assume they can exploit the additional channels.

--

Tim Roberts, timr@xxxxxxxxx<mailto:timr@xxxxxxxxx>

Providenza & Boekelheide, Inc.




Other related posts: