Live data from Hacker News

Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

twitter.com

201–210 of 237 posts

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#201
post #200
post #181

Earlier quoted context omitted.

Not sure if that's related to Apple's original problem, but in the scenario you are describing, the fix is trivial: detect when level commands are dropped and retry (up to N times / for up to X milliseconds). And don't forget to check existing volume between steps 1 and 2, so you can be made sure what the previous state was. I don't think the "fighting" will be a problem at all - you'd have to to press volume control…

Who should detect, who should retry, and how? I don’t know the macOS audio stack in detail, but I work on state synchronization problems in distributed systems and my intuition for problems like this is that the “why not just” solution almost never solves such a bug completely.

This is not a distributed system though, it's a local device, attached by USB or on some bus. So: who should detect? device driver. Who should retry? also device driver. How? by re-issuing the same request.

I've made drivers for badly designed hardware, and it's really not not that hard when you control the pieces. I mean, if it was Windows with all that backwards compatibility stuff and drivers written by 3rd party manufacturer than sure, it could be hard.. but Apple controls entire software stack, so they have no such excuse.

And the most important part is that the problem is very error-tolerant. Sure, having random balance change once per day is super annoying. But instead, imagine having one random volume change command per day be ignored.. People would not even notice, it would be a great improvement.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#202
post #18

The left/right channels drifting randomly is one thing (SoundSource fixes it), but it gets worse.. I've been trying to raise awareness of Apples horrible audio issues for quite a few years now. Driver re-starts and USB re-connects, for no apparent reason. [0][1] I have the issue on Mac Mini (2018) Intel, Mac Studio M1, Macbook Pro M2, so it's not device specific. [0] https://developer.apple.com/forums/thread/132423 […

I use an external DAC and encounter this crackling problem regularly. I have to unplug/replug my DAC to get it to go back to normal. I just thought it was a hardware problem with my DAC because it’s getting up there in the years, thought the caps might be going. Hmm…

I had an external audio interface with occasional horrible bursts of white noise. I assumed it was the CPU not being fast enough, because there was a correlation between work and the bursts… but in the end it was a power supply that wasn’t powerful enough for all my hardware (although everything worked). I changed it, and the issue went away.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#203
post #201
post #200

Earlier quoted context omitted.

Who should detect, who should retry, and how? I don’t know the macOS audio stack in detail, but I work on state synchronization problems in distributed systems and my intuition for problems like this is that the “why not just” solution almost never solves such a bug completely.

This is not a distributed system though, it's a local device, attached by USB or on some bus. So: who should detect? device driver. Who should retry? also device driver. How? by re-issuing the same request. I've made drivers for badly designed hardware, and it's really not not that hard when you control the pieces. I mean, if it was Windows with all that backwards compatibility stuff and drivers written by 3rd party…

> This is not a distributed system though

Are you sure? Audio volume is usually not (only) controlled in the device driver. Modern OSes usually have some type of audio mixer, often in user space. I'm pretty sure that this is actually where the problem lies, not in the hardware driver (given that it also persists across reboots).

This means you need IPC, and depending on how your API looks like, that's not that trivial to do right for inherently non-atomic operations.

A proper fix could be e.g. moving to a system where the IPC call is of the form "decrease global audio volume by 10%" and is executed atomically by the OS audio mixer, but that could well require backwards-incompatible changes. And...

> Apple controls entire software stack, so they have no such excuse.

Even Apple can't break backwards compatibility with all existing audio applications.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#204
post #112

Does not surprise me. I recently discovered that interrupting the close-all-apps-before-reboot workflow when applying a macOS upgrade (e.g., "don't terminate my terminal process yet, one sec, okay, I'm good to reboot now") requires a redo of the ENTIRE update process (including redownloading the 13GB update!)

The exact same thing applies to online reinstall of the macos. If your network has even the slightest jitter, you download the whole 10gb from the start. It was blowing my mind that there is a download manager/system, in 2024, can't even resume download a file after encounter network problem. Come on, you really shouldn't assume everybody have a perfect network that can just download a file from 0% to 100% without pr…

I'm similarly amazed when I'm downloading something from Google Drive and I get jitter -- Google Drive does not support restarting, so if it's a 10GB file, here we go again from the beginning.

What is it with these huge corps missing the simple stuff?

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#205
post #183

Earlier quoted context omitted.

the person said they download 3rd party app 10 years ago I don't see anything there about contacting Apple

Maybe I'm optimistic, but I find it unlikely that someone went to the time to build this app, maintained it for the last eight years, and thousands of people went to the trouble to find it, install it, and leave a review, all without anyone contacting apple about their problem. Edit: Apple was well aware of this issue (or a similar one), 12 years ago: https://web.archive.org/web/20221205223648/https://support.a... Th…

Sounds exactly like the example someone else used elsewhere in this thread of only one channel responding to volume changes.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#206

I have been producing music on macOS for 8+ years on multiple laptops (from x86 to ARM), different external DACs, wired and wireless headphones, etc. I am very sensitive to L/R balance and sometimes have to adjust the panning ever so slightly if my ears are off (e.g., after pressure change during a flight) in phone’s Accessibility settings. The fact that there is an Apple-specific L/R audio balance bug, which now see…

From my experience it's not really an audio bug, it's a bluetooth one. (though reading other people's comments it also happens over USB as well?)

Basically, there are lots of weird race conditions and oddities in how they deal with communicating and syncing volume between the system and the bluetooth device.

This can manifest in your system volume saying one thing and your bluetooth device outputting at a different volume when you first connect, and then you do one volume adjustment and the bluetooth device will "snap" to that volume.

Another way is what the twitter post is about, where when you ramp the volume up or down, with at least some devices this appears to be done per speaker (so per ear), and they can get out of sync. Imagine if the increaseOrDecreaseVolumeBy(speaker: id, amount: int) function was blocking and didn't queue requests. If one speaker takes longer to adjust than another one (wireless communication being what it is), the slower one will drop requests on the ground and get out of sync with the faster one.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#207

Earlier quoted context omitted.

M1 MBP's only come with two prong chargers, except in markets that use the British plug. Depending on the cause of the issue grounding could help, but you'd have to buy an extension cord with a ground.

There had been a grounded tail for apple powerbticks back to the era of g4 laptops. https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcSyVF...

Ever seen a short version without a cord? Similar to the standard two prong attachment?

Edit: https://a.co/d/6yvKXPW

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#208
post #89

Earlier quoted context omitted.

Except apple does also put ads in their os. And you can't even permanently disable them, the iCloud nagware comes back every once in a while trying to sell me overpriced storage.

Is it saying your storage is full or why is it nagging you?

It's nagging me because I don't use iCloud.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#209
post #143

It's almost like apple doesn't actually care ;)

Because CoreAudio is still a lot closer to "just works" than Pulse/Pipewire/Jack on top of ALSA on Linux and whatever the fuck Microsoft is doing with WASAPI and DirectSound. My Linux audio bug of the month is that output on all USB interfaces just stopped working. Not sure yet what changed (it wasn't an update, at least not immediately). On WASAPI last I checked you still couldn't programmatically change the device…

For me Pipewire changed that equation.

I am now convinced it is the best audio stack on desktop.

Re: Apple has not fixed the macOS audio left/right balance bug for nearly 10 years

#210
post #199

Earlier quoted context omitted.

Here is the contents of the bug I have reported with all the details and sample code to reproduce the problem: https://twistedwave.com/AudioGlitches.zip It contains a program where the only thing I do in the real-time callback is to count the glitches, and I made sure to mlock() the memory used by the glitch counting code. When the memory pressure increases, it glitches.

The point is to avoid the memory pressure from increasing. Have you investigated the allocation behaviour of ALL the code in your application?

The memory pressure is caused by other apps on the user's machine. My test program just increments a counter when there is a glitch, and requires a trivial amount of memory. Yet, it can see glitches when other apps run in the background allocating memory.
Post reply on HN