[pulseaudio-discuss] jack-module tips?

Ng Oon-Ee ngoonee at gmail.com
Fri Dec 10 08:25:59 PST 2010


On Fri, 2010-12-10 at 21:14 +0800, James Harkins wrote:
> A recent mention of the Jack modules got me thinking... what, really, is the right way to use them?
> 
> I wrote myself a little script:
> 
> pactl load-module module-jack-source
> pactl load-module module-jack-sink
> 
> And if I do this -- start jack server, run the script, and launch Skype, it seems to be good. Other programs -- VLC, gstreamer (by way of rhythmbox), virtual box -- can neither receive nor playback audio. It looks like they are still trying to use the ALSA sink for playback e.g., but Jack has control of that so it doesn't work.
> 
> So I guess what I want is for normal use (without Jack), apps should use the ALSA sink but when I've loaded the Jack modules, they should go through jack. Probably some extra pactl or pacmd commands to add to the script, which I could probably hack through on my own but I wouldn't be sure I got them right (or maybe they "work" but do something risky...? I.e., I know just enough to be dangerous :) but not enough to stay out of trouble.). Then, when I stop Jack, I would need pa apps to look back to the normal ALSA sink.
> 
> I'll have a read of the CLI http://pulseaudio.org/wiki/CLI later, but have other more pressing things to do tonight. Often I don't mind fiddling about, but when it involves bouncing sound servers up and down, I hesitate a bit more than usual.
> 
> (The reason is that often I need to run a Jack application [SuperCollider], and I may need to use a pa app occasionally without taking down the sc audio engine. For instance, I'm in China and collaborating with some folks in the US on a large project, and I might need to have Skype open and waiting while I'm composing. I brought this up on ubuntuforums once and promptly got a little lecture about how bad it is to run two audio servers at the same time -- don't especially need to be told that again :)  I wouldn't do this in any sort of mission critical situation like live performance or recording! Just when I'm working at home and I need the capability.)
> 
> Thanks,
> James

Your script should load the jack modules and set them as default. This
would only work if you haven't had your streams saved to go to the
soundcard via PA (module-restore-streams I think). Alternatively you
could just pactl list and unload your soundcard module, so only
module-jack-source/sink are loaded, it'll all work then.




More information about the pulseaudio-discuss mailing list