[HN Gopher] Making Sense of the Audio Stack on Unix
       ___________________________________________________________________
        
       Making Sense of the Audio Stack on Unix
        
       Author : zdw
       Score  : 75 points
       Date   : 2021-02-07 17:46 UTC (5 hours ago)
        
 (HTM) web link (venam.nixers.net)
 (TXT) w3m dump (venam.nixers.net)
        
       | beervirus wrote:
       | > The audio stack is fragmented on all operating systems because
       | the problem is a large one. For example, on Windows the audio
       | APIs being ASIO, DirectSound and WASAPI. Perhaps MacOs has the
       | cleanest audio stack, CoreAudio, but nobody can clearly say if
       | they can't look at the code. PulseAudio was inspired by it. The
       | stack of commercial operating systems are not actually better or
       | simpler.
       | 
       | Maybe so for developers, but _as a user_ on Windows or MacOS I
       | don't have to know or care about any of that stuff. Things just
       | work, and work sensibly.
        
         | jcelerier wrote:
         | > Maybe so for developers, but as a user on Windows or MacOS I
         | don't have to know or care about any of that stuff. Things just
         | work, and work sensibly.
         | 
         | depends on the kind of user you are. If you're looking for the
         | lowest-latency possible (for instance because you play guitar
         | with an effect stack going through your computer) then windows
         | with ASIO or linux with Jack give you a better mileage on the
         | exact same hardware than CoreAudio
        
         | cycloptic wrote:
         | I would say that's not at all true on Windows if you ever have
         | to install multiple ASIO drivers.
        
         | nsajko wrote:
         | Things can just work if your expectations are low and specific
         | requirements are common, and this is true independently of OS.
         | Where Linux shines (in general), is with customization or
         | uncommon requirements, which in this case would AFAIK be things
         | like low latency audio.
        
       | bigger_cheese wrote:
       | As far as I know a lot of those api's like aRts and ESD have not
       | been relevant for 10+ years. An article from 2021 mentioning them
       | seems a bit strange and contributes to the impression that things
       | are a lot more fragmented then they really are.
       | 
       | Thing have come a long way since old days when apps used to
       | exclusively lock the sound card.
        
       | petepete wrote:
       | Ah, I wish I'd have had this article back when getting working
       | Audio on Linux was an uphill struggle. Even knowing what to
       | Google was a challenge. Those times when things would all be
       | working and then you reboot and now nothing works, or getting to
       | the end of an MP3 (played in XMMS, of course) and then hearing 25
       | queued-up Gaim notifications.
       | 
       | Thankfully, the last ten years have been plain sailing. It just
       | works. Oh, except that on Gnome the volume remote half way up my
       | headphones cable adjusts the Pulse Audio master level rather than
       | the volume of the headphones themselves, but I can live with
       | that.
        
       | hctaw wrote:
       | Here's my Linux audio anecdote: I've never successfully gotten
       | jackd to run on my computer(s) running Ubuntu or pop_os, and
       | pulseaudio doesn't let me run with low enough latency to be
       | usable in Bitwig. I don't want to spend my time digging through
       | ancient forum posts on why jack/pulse can't "just work" when
       | everything is fine on MacOS and Windows. A reboot is faster.
       | 
       | Sidenote, audio stacks are not fundamentally fragmented.
       | DirectSound is deprecated in favor of WASAPI. ASIO only exists
       | because DirectSound sucked, now WASAPI is good enough not to use
       | ASIO moving forward (with some hiccups, like some software doing
       | SRC under the hood because WASAPI doesn't let you
       | programmatically select sample rate - RtAudio does this, for
       | example).
       | 
       | CoreAudio has been stable for almost 20 years. It is the gold
       | standard. The only problem is the almost complete lack of
       | documentation except for the CoreAudio mailing list.
       | 
       | If you're writing audio software the solution is to use WASAPI on
       | windows, CoreAudio on Mac, and tell Linux users to use Windows or
       | MacOS if they want low latency audio.
        
       | S_A_P wrote:
       | There is a factual error in the article. Middle C is not 440hz,
       | which is an A...
        
       | froh wrote:
       | On a tangent this makes me feel old. Unix, wasn't that solaris,
       | aix, ... ?
       | 
       | Today I learned: Unix now is Linux and free bsd.
       | 
       | Get me right, this sounds good, great, actually. Still, it amazes
       | me.
        
       | shadowgovt wrote:
       | The audio stack on Unix is easily in my top three pet peeves of
       | the desktop environment. It feels like a huge case of too many
       | cooks in the kitchen.
       | 
       | To this day, every time I upgrade my distro to a major revision I
       | just can't assume the audio will keep working. Latest upgrade of
       | Ubuntu, and I had to download alsamixer to get audio coming from
       | my headphones again on Zoom meetings. Both the output selector in
       | Zoom and the selector in Settings just... Stopped working. I
       | could select the headphone output, and nothing changed.
        
         | majewsky wrote:
         | > The audio stack on Unix is easily in my top three pet peeves
         | of the desktop environment. It feels like a huge case of too
         | many cooks in the kitchen.
         | 
         | This is also my opinion, which is why I was surprised by the
         | conclusion of the article. Money quote:
         | 
         | > The audio stack is fragmented on all operating systems
         | because the problem is a large one. [...] The stack of
         | commercial operating systems are not actually better or
         | simpler. [...] Linux is the platform of choice for audio and
         | acoustic research and was chosen by the CCRMA (Center for
         | Computer Research in Music and Acoustics).
         | 
         | I guess my gripe is this disconnect between "desktop audio" and
         | "pro audio". I have my PulseAudio set up the way I want it, and
         | that's what I need 99% of the time, but I would like to use
         | Ardour when I want to record a podcast, but whenever I read the
         | Arch wiki about how to have PulseAudio and JACK coexist, it
         | looks like a huge mess that I don't want to deal with. Here's
         | hoping PipeWire really shapes up to be my savior one day.
        
           | cycloptic wrote:
           | The simplest way to do this now is to install pulseaudio-
           | module-jack, that works pretty seamlessly in my experience.
        
           | jcelerier wrote:
           | > whenever I read the Arch wiki about how to have PulseAudio
           | and JACK coexist,
           | 
           | https://github.com/brummer10/pajackconnect
           | 
           | start jack, start pulseaudio, run pajackconnect, done
        
         | enriquto wrote:
         | Keyboard configuration of the login screen is another favourite
         | of mine.
        
       ___________________________________________________________________
       (page generated 2021-02-07 23:00 UTC)