← Back to context

Comment by lxgr

5 months ago

> 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.