From: steve c. <ste...@gm...> - 2011-03-02 03:23:35
|
I'm not always needing a full audiophile experience when I'm using Rosegarden and frequently wish I could hear sound on a web page or use some other non-jack aware sound app without all the bother of shutting down jack to free up the sound card every time. I also wanted to start regular old non-jack pulse after closing jack. I found this page very helpful in getting pulse to run through jack: http://www.harald-hoyer.de/linux/pulseaudio-and-jackd However, since I pretty well always want to start qjackctl when I log in, I wanted to setup qjackctl to start automatically minimized to the system tray and to start pulse as a jack client. After a bit of screwing around, I've managed to make this happen on my system. Thought what I've figured out might be some help to others with similar requirements. First, of course, I had to add qjackctl to my startup programs (Startmenu->System->System->Startup Applications on my OpenSuse11.3 system) The attached jpeg shows the relevant settings in qjackctl. Execute Script On Startup: killall pulseaudio Execute Script After Startup: sleep 15; pulseaudio -nF ~/jack.pa & Execute Script After Shutdown: killall pulse audio; killall jackd; sleep 5; start-pulseaudio-x11 Please note that this won't work properly without the two sleep commands. In the first instance, pulse will try to start before jack is ready for it, in the second pulse will start in time to be killed by the killall command. Also that without the ampersand at the end of the second command qjackctl will hang waiting for the script to return control. If I set qjackctl to start jackd automatically, sometimes it fails to start and I have to restart it manually, but I find this to be a problem with qjackctl in general, so I just have it set up to be started manually. The file ~/jack.pa is as follows. It only differs from Harald Hoyer's in that I've changed module-volume-restore to module-stream-restore because pulse was complaining about it being obsolete: #!/usr/bin/pulseaudio -nF # load-module module-jack-sink load-module module-jack-source load-module module-native-protocol-unix load-module module-stream-restore load-module module-default-device-restore load-module module-rescue-streams load-module module-suspend-on-idle .ifexists module-gconf.so .nofail load-module module-gconf .fail .endif .ifexists module-x11-publish.so .nofail load-module module-x11-publish .fail .endif |