Live data from Hacker News

PulseAudio under the hood

gavv.github.io

51–60 of 181 posts

Re: PulseAudio under the hood

#51
post #37

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…

Firefox stopped supporting ALSA, so I had to install PA. PA gives me: a noise chirp when the PA daemon starts, which is probably some uninitialized garbage buffer. Sometimes (I don't know what triggers it, seems to be random, and no, it's not the auto-suspend module which is on by default but seems to cause a similar bug for many people) audio starts to lag by .3-.5 seconds. Restarting PA does not help; have to reboo…

> Restarting PA does not help; have to reboot

Then PA is not the problem, your sound card/drivers is.

Re: PulseAudio under the hood

#52
post #33

It would appear that I'm one of the few fans of pulseaudio here. Although I've only started using it since version 9, it always worked fine and we can do quite complex workflows easily. An example scenario: 1. We have multiple incoming RTSP stream where the audio is added as pulse audio streams. 2. We mix a couple of these streams. 3. We send this stream to an external echo cancellation device. 4. We take back the ou…

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 network audio streaming. None whatsoever. Didn't even have a hint the support for those autoconf protocols existed.

I did once try to stream a Pulseaudio stream from one linux system to another. I never got so much as a peep to go across. I have no idea where any diagnostic messages may have gone that might help me debug this. I have no access to a working configuration to compare to. I have no idea what I did wrong and no idea how to fix it. I can find documentation that assumes you're writing C extensions and I can find documentation on how to slide sliders in the Gnome volume app, but I can't find anything in between. And I'm a professional software engineer with a minor in electronic music; there are certainly people with more knowledge and more motivation on these matters than me, but on the flip side, features that I can't figure out or get working might as well not exist to the vast majority of the population.

So while I'm not asking you to write a manual page, how exactly did you get to the point where you can do that? Again, I'm serious; the previous paragraphs are not to just slag on a project, but to show where I am and what problems I'm having. I've got a project I'm trying to do where it would be really useful to understand these things, but I have no idea even where to look at this point. (I've poked in every Google search I can think of and gotten the aforementioned C-API level docs or "I just installed Ubuntu, how do I volume?" docs.)

Re: PulseAudio under the hood

#53
post #37

Earlier quoted context omitted.

Firefox stopped supporting ALSA, so I had to install PA. PA gives me: a noise chirp when the PA daemon starts, which is probably some uninitialized garbage buffer. Sometimes (I don't know what triggers it, seems to be random, and no, it's not the auto-suspend module which is on by default but seems to cause a similar bug for many people) audio starts to lag by .3-.5 seconds. Restarting PA does not help; have to reboo…

You should install apulse and run that with Firefox! Works like a charm.

You can also compile FF with ALSA enabled. Gentoo has a useflag for that.

Re: PulseAudio under the hood

#54
post #53

Earlier quoted context omitted.

You should install apulse and run that with Firefox! Works like a charm.

You can also compile FF with ALSA enabled. Gentoo has a useflag for that.

This is the better option (aside from fixing your PA config in the first place, which I'd heavily recommend instead). apulse can get into issues with Firefox's sandboxing. It supports PulseAudio and works with ALSA too, but ALSA-pretending-to-be-PA won't work.

But really, fix your PulseAudio instead.

Re: PulseAudio under the hood

#56
post #47

Earlier quoted context omitted.

I remember when PulseAudio came out. I loved it! I could actually have two programs open playing audio at the same time[0]. The future was now. [0] If I remember correctly, this was due to driver issues, but somehow PA just handled it.

Old versions of ALSA only supported one input, but that's been a solved problem for a decade.

At least.

Older versions supplied dmix but didn't automatically enable it. Newer versions are supposed to autoenable it on audio devices without hardware mixing.

Frankly the only thing PA brought to the table was the ability to handle multiple audio devices while there is ongoing audio IO. Primarily in relation to usb headphones/headsets. But then that class of hardware is its own kind of abomination in the first place.

Re: PulseAudio under the hood

#57

Related: "Launching Pipewire" [0], which is meant to (among other things) eventually replace PulseAudio. [0]: https://blogs.gnome.org/uraeus/2017/09/19/launching-pipewire...

As a naive user my response to that is "great, just as pulseaudio seems to be working properly and keeping out of the way; now we get something new with more bugs and less features".

>"We know that for many the original rollout of PulseAudio was painful and we do not want a repeat of that history." //

There's some hope!

Re: PulseAudio under the hood

#59
I've had mixed experiences with Pulse. Although kind of flaky, it has been super useful for me to handle audio from my Chrome browser that I run in a VM and display via X. I'm not aware of any other way to pipe audio across the network these days, other than the pulse tcp module.

Re: PulseAudio under the hood

#60

Related: "Launching Pipewire" [0], which is meant to (among other things) eventually replace PulseAudio. [0]: https://blogs.gnome.org/uraeus/2017/09/19/launching-pipewire...

GDIt. This, this is why Linux is not on the desktop. Constant CADT churn.
Post reply on HN