FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.74k stars 406 forks source link

Bluetooth Audio issues on MacOS Catalina #1828

Closed mlooney closed 1 year ago

mlooney commented 5 years ago

Description When using bluetooth mic & headphones, selecting "voice activation" in audio options disables the audio through headphones.

Steps To Reproduce Go to settings while using connected bluetooth headphone & mic combo, select "voice activation", audio will cut out, mic will cut in.

Version v0.9.3.3

Additional information Headset works fine in other apps.

mlooney commented 4 years ago

Still busted in 0.10.4.0

I've gone through 4 different bluetooth headsets to no avail. including, but not limited to AirPods & AirPods Pro.

The issue seems to be the bluetooth part, as a 1/8" minidin wired connection works just fine (standard wired earbuds & mic).

the moment the mic is accessed (in game, or in settings->voice chat), all main sound disappears, music & sfx included, indeed, even system sounds. The mic does register on the meter though, so that little bit might be working, though it's impossible to tell from here. microphone access is checked for barotrauma in "security & privacy" settings.

mlooney commented 4 years ago

still busted as of today. I suspect it may be due to switching audio codecs. sfx & music using one, and voice chat using another. that's usually the cause of other bluetooth headset problems I've experienced.

mlooney commented 3 years ago

Well, I finally figured it out. As suspected, it's due to the bluetooth audio specification, and the way it picks different codecs for different modes.

By default, MacOS does not enable the microphone for bluetooth audio, and uses the "high quality audio" version of bluetooth, which uses up all possible bt bandwidth for hi quality audio (for listening to music etc). When an app requires microphone support (zoom, discord, whathaveyou), the bluetooth framework is supposed to kick into "crap audio, but with microphone" mode. Barotrauma is somehow screwing this up this transition.

There is a workaround though:

Open up any app that uses the microphone, before opening BT (voice memo, discord audio chat, whatever). This will kick the bluetooth framework into "crap audio with microphone" mode. Once BT is started, you can close the app opened previously. Team audio chat should now work.

Reference: https://habr.com/en/post/456182/

@Regalis11

mlooney commented 1 year ago

bluetooth sucks. it's the difference between "super great audio, but no input" mode, and "shitty audio, but input works mode" which one can manipulate prior to launching the game, by opening voice recorder to trigger shitty mode.