[pulseaudio-discuss] jack-module tips?

Colin Guthrie gmane at colin.guthr.ie
Sun Dec 12 12:25:27 PST 2010


'Twas brillig, and Ng Oon-Ee at 10/12/10 16:25 did gyre and gimble:
> 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.

You should probably also have a look at David's recent
module-jackdbus-detect module which automatically loads the jack modules
when jack starts.

There are still issues to work out (essentially the ALSA sinks are still
kept loaded but their streams corked so they wont automatically move
across to the new Jack sink)

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list