mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.44k stars 1.12k forks source link

[Windows] Attenuate when multiple outputs #6055

Open AtmanActive opened 1 year ago

AtmanActive commented 1 year ago

Description

I have a pretty non-standard audio setup on my Windows + Mumble. I'm using a dedicated audio device for Mumble output, while Windows is using a default (different) audio output. This enables me to have bone-conducting headphones to listen to Mumble voice while still being able to listen to Windows audio output (game, music) via speakers. So this means that Mumble has Windows default audio as input, but it has a dedicated audio hardware for output.

Except for attenuate feature, everything is working very well.

Now, even though I have attenuate enabled in Mumble, it seems like it is not doing anything and I suspect it to be related to using this dedicated audio hardware for output.

So my question is: is Mumble's attenuate feature output-device-related? And if so, is there a way around this? Could it be possible to assign a different audio device for attenuation purposes?

Steps to reproduce

If you have only one audio device in your windows, you can't reproduce this.

Configure Windows to use device A. Configure Mumble to use input device A. Configure Mumble to use output device B. Enable attenuate-while-other-users-talk and attenuate-while-you-talk. No attenuation takes place.

Mumble version

1.4.287

Mumble component

Client

OS

Windows

Reproducible?

Yes

Additional information

No response

Relevant log output

No response

Screenshots

No response

Hartmnt commented 1 year ago

is Mumble's attenuate feature output-device-related?

The code for attenuation in the Mumble Windows Sound API https://github.com/mumble-voip/mumble/blob/f73db9da7ac81eda2c6eeacad6c97d97481a5e65/src/mumble/WASAPI.cpp#L1080-L1093 does indeed seem to suggest, that only and explicitly the output device can be attenuated. The PulseAudio API (for Linux) does support attenuating all output devices IIRC.

So, unless there is a Windows specific limitation why this can not be done, I would consider this to be a feature request instead of a bug.

Hartmnt commented 1 year ago

Relevant historic commits: 7a058a9bba1 0e4d963a5a76 5b104e09c04f

AtmanActive commented 1 year ago

Understood, thanks.

So in a perfect world, attenuation UI would have a device selection drop-down which would be identical to the one for audio output with the default value 'Default' which would just use the same output, but would allow for some other audio device to be assigned there. Then, Mumble would open both audio devices using output for audio output, and using attenuation for attenuation purposes even though there is no audio going there (or maybe silence needs to be routed there).

Is something like that feasable?

Thanks.

Cheers!

Hartmnt commented 1 year ago

Is something like that feasable?

Theoretically, yes (without knowing the Windows specifics). Just adding a checkbox for "attenuate all output devices", as is the case for PulseAudio, would be much simpler and cover most use-cases. The only thing missing now is someone who would want to work on this who also has a Windows development environment ;)

Sonny-Crockett commented 1 year ago

I would like to also request this feature.