Live data from Hacker News

PulseAudio under the hood

gavv.github.io

161–170 of 181 posts

Re: PulseAudio under the hood

#161

Earlier quoted context omitted.

I think the use cases you're describing are quite distinct from a "Linux on the desktop" user. The audio experience for this kind of user (myself included) has improved dramatically in the past few years.

I'm a desktop Linux user; I preferred the old way. I do get that most people like multiplexing (I don't; I want exactly one sound source at a given time), and I'll grant that has improved. I banged my head against my desk for a couple of days when Slackware switched to Pulse with 14.2, allegedly because it was needed for bluetooth. I still have difficulty believing that people actually use bluetooth for audio, but ap…

> allegedly because it was needed for bluetooth

The bluetooth stack dropped support for ALSA with Bluez 5.0. About a year ago, dev started on a "bluez-alsa" or BlueALSA package the re-integrates an ALSA backend. I've used it briefly; it seems to work as advertised.

I think that Bluez 5.0 came out about the time that Slackware 14.0 did, so it makes some sense that versions before 14.2 would've provided Bluez 4.x for the bluetooth stack.

Re: PulseAudio under the hood

#162

I am quite surprised that PulseAudio has a bad reputation. I couldn't get ALSA working on Arch Linux, and simply installing PulseAudio resolved all my issues. From the sentiment here I get the feeling that it might stop working any moment.

It use to be terrible. Steam games would generate static, you'd occasionally get video/audio lag, etc. I started really using it when I started using Linux laptops, just because it's way easier to connect bluetooth audio, ship audio over HDMI, etc. It actually works pretty well now and I like it. Still hate and refuse to use systemd though. :-P

I love how this is downvoted. Sorry fanboys, but as someone stated above, when Ubuntu started shipping with pulse as default it was a buggy mess.

That initial experience soured a lot of people on it.

Re: PulseAudio under the hood

#163
post #92
post #88

Earlier quoted context omitted.

I don't: wireless headphones seem strictly worse in every way than wired. They require batteries and charging; they introduce lag; they are expensive; they are easier to lose; they don't have a convenient cable to hang on to. I am completely and totally flabbergasted by their popularity. It's as though millions of people were turning their noses up at fine, free homemade French food and paying for McDonald's instead.

> seem strictly worse in every way than wired. The same as wifi, right? Strictly worse in every way. Except for the not needing wires way.

Although...different use-cases there, for me. I've got a dozen audio sources, either connected to speakers (the TVs) or within a couple feet of me when I'm using it (phone, media player, tablet, laptop). So, a bunch of sources, a couple of which I might be listening to at once. All either in short enough distance for cords, or loud enough that it's moot.

Wifi: The internet comes from one (inconvenient) place in the home that I can't choose. I've got a couple of powerline ethernet adapters, but I've also got a lot of devices that handle wifi, but not ethernet. The choice is between using wifi or skipping the network connection. It's great as a last- (or only)-resort connection option, and it's usually sufficient, but then my uses for it are usually pretty tame anyhow.

Re: PulseAudio under the hood

#164

Earlier quoted context omitted.

> I still have difficulty believing that people actually use bluetooth for audio So you don't believe that somebody would like to be able to use wireless headphones?

Exactly. Why would you trade something that doesn't require power, has the most reliable, secure, and lossless transmission channel known, and is "configured" by plugging in hardware for something that requires power, has a less reliable transmission channel that can be easily snooped or forged, has to be configured in software? I literally don't understand why anyone would ever choose the latter.

I want to own exactly one wireless headset/microphone so that I can get up from my computer without having to excuse myself from voice chat.

Re: PulseAudio under the hood

#165
post #145

Sigh. Once upon a time, sound cards were files in the /dev tree. To play sound, you wrote pcm data to the file representing a sink. To record, you read pcm data from a file representing a source. Things were better then. I'm sure there are people with use cases that have required the four (and counting!) solutions crufted on since then, but I've never been one of them, and it irks me that the interfaces get more and…

And what happened when two processes wrote to that file? And what if they where each in a different sample rate? ....

[deleted]

Re: PulseAudio under the hood

#166
post #52

Earlier quoted context omitted.

Seconded. When Pulse works, it's really magical. Like when you go to the hackerspace, connect to the Wifi, and the room speakers appear in your mixer and Just Work.

So, this is an honest question, not an attempt to be cruel: How exactly do you get that to happen? Because my reaction when I read the linked article was that pulse sure does seem to have a lot of features that sound pretty useful, but after years and years of nominally having it on my system in charge of my audio hardware, I have, to be blunt, absolutely no clue how to use any of those features, except a bit about n…

In addition to the fully open options; you can connect to AirPlay devices with PulseAudio if you have the module for it installed. Not sure if it's default on many distros since I use Arch (where little to nothing is installed by default).

Re: PulseAudio under the hood

#167
post #95

PulseAudio posts are always filled with naysayers; the vast vast vast majority of users (like systemd in this regard) have no idea it's even running and just get on with whatever they're doing. I've primarily run Linux over the last fifteen or so years and barely had an issue that's directly PA's fault. I remember the bad old days where a playlist would finish and then GAIM's notification sound would bleat fifteen ti…

For me, personally, the bad old days before PA was OSS, when an application could squat on the audio hardware and absolutely disallow any other software from playing any sounds at all on the system until it was stopped or forcibly killed. And good luck finding which piece of software was claiming absolute ownership of your sound card. PA gives me the ability to have multiple pieces of software making noise at once, a…

To be more precise, that was the state of affairs with OSS on Linux. On FreeBSD, for example, the same OSS API has been providing transparently multiplexed output for many years. I don't even know how long, but I recall it already being there when I was fighting with dmux.

Perhaps not coincidentally, the primary sound API on FreeBSD is still OSS.

Re: PulseAudio under the hood

#168
post #121

Earlier quoted context omitted.

Chrome, for example. Remember http://packet.city/ from a few days ago? All Chrome supports is mute or unmute.

So how do you ensure that one tab wasn't much louder than the other? In this case, it doesn't make much sense to treat the browser as a single application, but each site as one (does Chrome export each tab as a separate source to PA? IDK, I haven't checked). And, I can't think of a single thing that I actually want producing sound (and don't mind just muting) from my web browser that doesn't have its own volume contr…

In my use, zero or one tabs is producing sound at any one time, so the distinction doesn't really matter to me.

Re: PulseAudio under the hood

#169

Earlier quoted context omitted.

Also spoken confidently like someone that never tried to play sound in two applications at once. This has worked well in ALSA for years now. Now, ALSA won't let you set the volume of each application separately, but most applications have their own volume control for that anyway. And you'll never have to deal with the application's volume Pulse's volume for that source disagreeing, and scratching your head as to why…

Another "lovely" thing about PA is that will allow the loudest of the "apps" (groan) to ramp up the master control (do not recall the "feature" name right now). Do wonder how much future hearing loss it has created by sudden spikes in volume...

You are talking about "flat-volumes", I also recommend disabling it. Even forgetting the issue you mentionned, it just makes volumes harder to handle and reason about.

I wonder if they would have ever implemented this "feature" if it wasn't the default (and only) behavior on Windows...

Re: PulseAudio under the hood

#170
post #24

I am quite surprised that PulseAudio has a bad reputation. I couldn't get ALSA working on Arch Linux, and simply installing PulseAudio resolved all my issues. From the sentiment here I get the feeling that it might stop working any moment.

It's mostly historical - Ubuntu shipped it as the default when it was still unstable. This lead to a lot of people learning about it and lots of 'try killing pulseaudio if something goes wrong' advice. The reality now is it is very stable and has a huge number of powerful features. Personally I think it is great, and have no issues with it.

I had to laugh - I'm using Ubuntu, and every time I want to listen to music (or watch a video, or play a game) I have to pulseaudio -k, because for some reason it boots up with some horrid 8-bit 22khz distortion over it all.
Post reply on HN