[wdmaudiodev] Re: [EXTERNAL] SFX APO doesn't work when MS Teams runs :(

  • From: Culann mac Cabe <culann@xxxxxxxxxxx>
  • To: wdmaudiodev@xxxxxxxxxxxxx
  • Date: Tue, 19 Oct 2021 21:46:18 +0100

Thanks Matthew for your prompt response!

Can I clarify please:

   - Do you know in fact that MS Teams sets AUDCLNT_STREAMOPTIONS_RAW and
   thus disables non-essential processing?
   - Is there a tool/technique that I can use to inspect/confirm that MS
   Teams does this?
   - IF it's the case that Teams does indeed set
   the AUDCLNT_STREAMOPTIONS_RAW property, am I out of options?  Any
   workaround?

Thanks again for your help.
Culann



On Tue, 19 Oct 2021 at 21:20, Matthew van Eerde <dmarc-noreply@xxxxxxxxxxxxx>
wrote:

As to the “how:”



There are two ways for apps to influence what kind of processing is
applied to their streams.



One way, as you mention, is to use AUDCLNT_SHAREMODE_EXCLUSIVE. This is
generally discouraged, for various reasons.



Another way is to fill up an AudioClientProperties object and pass it to
IAudioClient2::SetClientProperties. One of the properties that a client can
set is AUDCLNT_STREAMOPTIONS_RAW which will also disable non-essential
processing.



Windows-universal-samples/WASAPIRenderer.cpp at main ·
microsoft/Windows-universal-samples · GitHub
<https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/WindowsAudioSession/cpp/WASAPIRenderer.cpp>

    // Opt into HW Offloading.  If the endpoint does not support offload
it will return AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE

    AudioClientProperties audioProps = {0};

    audioProps.cbSize = sizeof( AudioClientProperties );

    audioProps.bIsOffload = m_DeviceProps.IsHWOffload;

    audioProps.eCategory = AudioCategory_Media;



    if (m_DeviceProps.IsRawChosen && m_DeviceProps.IsRawSupported)

    {

        audioProps.Options = AUDCLNT_STREAMOPTIONS_RAW;

    }



    hr = m_AudioClient->SetClientProperties( &audioProps );



As to the “why:” that’s a good question, but you would need to ask the
Teams folks.



*From:* wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx>
*On Behalf Of *Culann mac Cabe
*Sent:* Tuesday, October 19, 2021 1:04 PM
*To:* wdmaudiodev@xxxxxxxxxxxxx
*Subject:* [EXTERNAL] [wdmaudiodev] SFX APO doesn't work when MS Teams
runs :(



Some people who received this message don't often get email from
culann@xxxxxxxxxxx. Learn why this is important
<http://aka.ms/LearnAboutSenderIdentification>

Hello wdmaudiodev people!



I have developed an APO which I instantiate as an SFX (one of its features
is that it changes channel count from input->output and so I can't use it
as an EFX).



I use it all the time: to watch and hear things on YouTube, Netflix, my
favourite Music Player etc etc   I have noticed that, when using the
Microsoft Teams App, I get no APO and I want to understand why or how best
to find out.



I recalled a previous thread to the effect that when an audio endpoint
device (typically a USB Headphone) is configured in Exclusive Mode, APOs
may not be instantiated and so I made sure to disable this check box...
still no APO.



So: can anyone explain to me please:

How/why it is that Teams prevents, in some way, the "usual" behaviour of
my APO, even when I ensure to disable Exclusive Mode?

   - APO is [1, 2, 5.1, 7.1]-channel In -> 2ch Out
   - I install it as an SFX

Thanks!

Culann

Other related posts: