4 ms·
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
by kabes 9y ago
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 output of the echo cancellation device.
5. We mix some more streams into it
6. We route this to a certain output, which can be dynamically changed according to a certain algorithm.
We control PA using DBUS and the above scenario is accomplished with only a few calls.
Granted, there's some latency you can't really control, but all in all it's an incredible powerful system that's been working really well for us.
- majewsky 9y agoSeconded. 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.
- jerf 9y agoSo, 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.)
- c0l0 9y agoPulseAudio (PA) is modular, and you can load new modules implementing new functionality at runtime via `pacmd` (and presumably other clients/config tools). One of these modules that come with any standard distribution of recent-ish PA can use avahi/zeroconf (probably in part because avahi was Lennart P.'s previous focus of attention, before he started work on PA) to advertise PA sinks on the network. As a consequence, running the avahi daemon is required for PA network-wide advertising of its presence to work, and auto-discovery to have any chance of working at all. Another module implements accepting PA-via-TCP compliant clients via TCP. Both are included in PA's standard distribution, if it's recent-ish (think 2012 and later). Distros still might package them in extra packages; the Debian does so for the zeroconf-parts in a package named "pulseaudio-module-zeroconf". To load the TCP transport support module and specify a primitive ACL (based on source IPv4 addresses - you need to adapt this ACL to your local environment if it uses another IP range!), you can use this `pacmd` stanza: load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16 auth-anonymous=1 (A presumably more secure, cookie-based authentication mechanism with a shared secret involved is also available, but I've never used it.) This will make pulse open a listening TCP socket on port 4713. At this point, remote hosts with PA-ready applications should already be able to play back sound by setting the PULSE_SERVER environment variable to the accepting PA server's address - what's still missing is the avahi-based advertising of the service. So, to make PA contact your system's avahi daemon and use it to advertise its sinks on the network, you load another module into your PA instance: load-module module-zeroconf-publish If both these operations have succeeded (`pacmd` will complain loudly if they don't), a quick `avahi-browse -a` on a (avahi-enabled) host in the same network as the one with your exposed PA server in it should yield something like this (pasted from my local network): + enp0s31f6 IPv6 pulse@nas PulseAudio Sound Server local + enp0s31f6 IPv6 pulse@nas: Jukebox PulseAudio Sound Sink local + enp0s31f6 IPv6 pulse@nas: Dummy Output PulseAudio Sound Sink local + enp0s31f6 IPv4 pulse@nas PulseAudio Sound Server local + enp0s31f6 IPv4 pulse@nas: Jukebox PulseAudio Sound Sink local + enp0s31f6 IPv4 pulse@nas: Dummy Output PulseAudio Sound Sink local + enp0s31f6 IPv4 root@tv PulseAudio Sound Server local That is two hosts advertising PA sinks on the network - "tv" (running libreelec) and "nas" (running Debian). Now, when you make another avahi-enabled host on the same network load the "module-zeroconf-discover" PA module, the advertised sinks should magically show up in that PA instance's list of available sinks. You can then move streams onto them with any of the standard utils, like pavucontrol. If you've found a set of stanzas that set up your PA instances to your liking (with modules loaded the way your setup requires it), you can make them re-apply on daemon startup by persisting them in your user-specific rc files in ~/.config/pulse/. Hth! :)
- jlarocco 9y ago"Magic" is apparently the key word there. I've never had a good experience with Pulse, never had it work out of the box, and can never find information about configuring it. It gets uninstalled on every machine I run. I stick with plain ALSA. It's annoying to configure, but IME it works out of the box and I usually don't have to worry about it.