BackgroundMusic icon indicating copy to clipboard operation
BackgroundMusic copied to clipboard

Audio distortion making it impossible to hear anything

Open MoonPhoenix83 opened this issue 3 years ago • 15 comments

Description of the bug The audio ~~is distorted and impossible to hear~~ when my blutooth headphones are reconnected. Update: paused all video playing but the distortion is gone. The audio is still there but the video is stuck on one frame.

Steps to reproduce Play any audio throught background music after reconnecting bluetooth audio device ~~(sounds like a Dalek and completely inaubible)~~ (See above)

Versions

  • Background Music: 0.4.0-SNAPSHOT-c0ab98b
  • macOS 11.2 Public Beta Big Sur

Hardware

  • Computer: MacBook Air (Retina, 13-inch, 2020)
  • Audio Device: Sony WH-XB900N

MoonPhoenix83 avatar Feb 27 '21 16:02 MoonPhoenix83

Update: paused all video playing but the distortion is gone. this bug makes the app impossible to use so I have downgraded as a temporary solution

MoonPhoenix83 avatar Mar 01 '21 10:03 MoonPhoenix83

A lot of Bluetooth devices will switch to a single channel mode in some cases. From the sound of it, that's probably not what's happening here, but it's worth checking anyway. Background Music currently only supports 2-channel devices.

kyleneideck avatar Mar 03 '21 14:03 kyleneideck

By channels do you mean left/right audio so stereo?

MoonPhoenix83 avatar Mar 03 '21 15:03 MoonPhoenix83

I have the same problem where it sounds really glitchy, it only happens when I'm using my AirPods. Mac OS Big Sur

bloomkd46 avatar Mar 03 '21 20:03 bloomkd46

@MoonPhoenix83 That's right. You can check with Audio MIDI Setup.app.

kyleneideck avatar Mar 03 '21 21:03 kyleneideck

never mind I found out that zoom was changing my audio settings to mono.

bloomkd46 avatar Mar 03 '21 21:03 bloomkd46

Right, I checked the channels in Audio MIDI setup and they're all 2 channel. But, as a temporary fix, after a few tries between switching between the headphones and Background music, it worked. I will try to fiddle with zoom to find a long term solution, but this is good for an interim.

MoonPhoenix83 avatar Mar 03 '21 22:03 MoonPhoenix83

When I have this problem with wired headphones, if I leave Background Music open, switch my system audio device to the computer speakers, switch the Background Music output device to the computer speakers, then select my system audio device to Background Music then change Background Music's output device to the headphones, it fixes it. Don't know if this works with Bluetooth headphones.

OEverything avatar Mar 10 '21 18:03 OEverything

But if that doesn't work then just mess with the hz output in Audio MIDI Setup a bit then bring it back to 48k.

OEverything avatar Mar 12 '21 17:03 OEverything

And if that still doesn't work then idk about a fix for it.

OEverything avatar Mar 14 '21 17:03 OEverything

Same problem here. Google meet and youtube at the same time, "meet" sounds well, but youtube only emits an inaudible noise.

My hardware:

  • Computer: MacBook PRO (13-inch, 2020)
  • Audio Device: FiiO BTR5

iranzoferri avatar Mar 19 '21 10:03 iranzoferri

I found that restarting the computer works to fix it. After restarting, open Background Music before you play any media and it should be fine.

OEverything avatar Mar 19 '21 16:03 OEverything

TL;DR — worth looking into codecs?

I’ve experienced the distortion too. I’ve been wondering if this is a mid-playback codec-switch thing, though…

AFAIK, most bluetooth two-way audio devices (like my Sony WH-100XM3 headset) use one bluetooth profile and codec when the mic is in use (HFP with SCO in my case), and a much higher-quality codec when only playing audio (A2DP with AAC or SBC). Most of the times I experience this distortion, my headset was communicating over one bluetooth profile (and therefore a corresponding audio codec), and switched to another While in a Microsoft Teams meeting with my headset’s microphone in use (when the bluetooth profile selected is HFP, and the codec used for audio output is SCO)

116709936-d2454e00-a9ee-11eb-9bab-8c27e665022f But while just *playing* audio, like on a website or local app, the A2DP profile is selected, and (depending on the bluetooth device, something like SBC or AAC): 116712225-4254d380-a9f1-11eb-872d-1323dde836ed And in my experience, it’s these *switches* that are the culprit. I’ve once successfully obtained undistorted audio through the SCO codec (with my mic on during a Teams meeting), and AAC output works fine for me most of the time. To make it all work in either profile, I’ve had to play a lot of acrobatics, restarting the concerned audio-providing service (Teams, Music, etc.), restarting Background Music, toggling the output to the Internal Speakers in the Background Music menu and then back to my bluetooth device. And so far, only a random combination of these stunts makes it all work in a certain codec without distortion, so I tend to keep it in A2DP by refraining from using my headset mic altogether nowadays xD

Hope this helps!

P.S.: Sorry about the distracting graphs in the screenshots

mavenor avatar Apr 30 '21 14:04 mavenor

Lol 🤣 I was so convinced Now I think I was being stupid Maybe it’s the BGM audio device? Wondering cuz restarting coreaudiod seems to help me sometimes…

mavenor avatar May 13 '21 07:05 mavenor

I confirm this is a bug and it shows very often (like a buffer memory overflow issue). The only way to resolve it is to reset coreaudiod. I hope there can be an auto buffer clear function integrated to avoid such an issue from arising.

cepsong avatar Mar 18 '23 14:03 cepsong