On Wed, May 29, 2013, at 09:17 AM, IOhannes m zmoelnig wrote:
i dimly remember some discussion (on LAD, iirc) why having jack with d-bus enabled by default was a bad idea. maybe things have improved since then.
one of the problems of Pd i see is, that all the audio backends are linked into the main binary. so if you have a binary with jack/dbus support, you *must* install jack/dbus or you will not be able to use Pd at all (even if you don't care for audio at all).
I think the situation with jack is somewhat problematic, since there are now three variants of jack, where jack1 and jack2 both can be run as jackd - but jack1 and jack2 do not support the same stuff, and where jackdbus, while a form of jack2 is not operated the way jackd is. Perhaps it is a sign of an organizational problem within the jack community? I would really make things easier if there was only one jack.
From pd point of view, I suppose one could argue there is only two forms
of jack: jackd and jackdbus - would that be correct? Where jackd could be either jack1 or jack2.
This is something I'm beginning to see as somewhat of a problem in the Linux audio community, and as the project lead of Ubuntu Studio, I'm putting it as one my goals this year to see how we who package the applications can influence the infrastructure of the audio systems for the various Linux distros - in this case Debian and its derivatives. And also how we can influence the upstream jack developers as well.
Not sure if pulseaudio can be used for low latency. Haven't ever heard of anyone trying, but it is the standard sound system on most Linux distros today. Supporting it seems like a good idea. Even if you might not be able to get low latency.
Since I'm not much of a coder yet, I don't know very much about how applications interact with jack. But, from a user point of view, I'd prefer pd to autostart whatever jack is installed, preferably jackdbus over jackd, for the simple reason that it offers more functionality.
= About pulseaudio and jack integration (for those who are interested)
pulseaudio and jack integration is getting much better. With the release of pulseaudio 3.0 a bug was fixed, allowing jack to seemlessly grab a pulseaudio reserved card. (This works for jack2 only - which as said exists in two forms: jackd and jackdbus)
If having installed the jackdbus detect module (which is a part of pulseaudio source, but packaged separately), and you are running jackdbus, the module automatically creates a jack sink and source for pulseaudio, allowing the user to connect pulseaudio to jack.
So, if pd is set to start jackdbus by default, it would either just cut audio from pulseaudio completely (if pulse is using the same card), or with the module - more or less seemlessly connect pulseaudio to jack, keeping desktop audio intact.
There are still some problems with the module.
It eats a lot of CPU.
One problem is channel configuration. It's configurable nowadays, and I was able to make it default to 2 channels by default in the upstream source, which makes it go easier on the CPU, and makes it easier to use with multichannel cards (where the channel config might otherwise not make sense). It's missing the feature of profiles that audio cards otherwise have - stereo, 5.1, 7.1, etc.
Another problem, which is more about convenience, is that it doesn't automatically set applications that are already streaming audio to use the jack sink and source. You need to do that manually using a pulseaudio mixer.
I would say integrating pulseaudio and jack is working fairly well, but because you are dealing with two different audio systems, or three (if including alsa), as well as there being variants of jack, it is not easy to get an overview from the user point of view. There is no gui app that controls all of them.
= My recommendation
My recommendation at this point would be to let pd use pulseaudio by default (once it was supporting it). And if the user would set pd to use jack, it should start jackdbus if exists. And if not, jackd.
In the Ubuntu Studio team, we're talking about creating a gui application for controlling jack and the integration with pulseaudio in a much less painful way. Currently, the gui controls that exist don't really do that. I believe that would help smoothen some things out a bit.