logoalt Hacker News

embedding-shapetoday at 4:01 PM4 repliesview on HN

> you have the stupid situation Linux used to have where only one app could play audio at a time

When was that? I think my first Linux distribution was Ubuntu 8.04 and fairly sure it shipped with PulseAudio which in mind always been able to play audio from multiple sources at the same time, maybe I misremember?


Replies

loegtoday at 6:58 PM

In the time before PulseAudio, when it was ALSA (and OSS).

show 1 reply
Matltoday at 4:57 PM

Pure ALSA would behave like that because the currently playing process would take exclusive control of the hardware.

Upsite: Highest quality playback.

Downside: Only one process could play audio at a time.

show 3 replies
mixmastamyktoday at 4:28 PM

Came later I believe. They had esd and other sound “servers” back then however. Might have had to install it yourself.

skydhashtoday at 4:37 PM

If you have two audio streams, you can't play them as is on the audio device, you have to mix them together. The same happens with analog speakers as you can't just add two signals together. I believe at one point with Alsa, when an application takes control of the audio device, no one else could play with it. Now Alsa comes with dmix (a digital mixer feature) enabled in its default configuration, so two applications may play how they want. And we have PulseAudio, Jack, and Pipewire on top of Alsa to add more features.

OpenBSD still present raw audio devices, but they have sndio which provides a more helpful interface for applications including resampling (not the best algorithms there, according to them).