Subject: Re: [linux-audio-user] new computer woes
From: Speaker to Vegetables (speaker-to-vegetables_AT_pobox.com)
Date: Sat Dec 21 2002 - 20:06:45 EET
> > Try creating a shell script, eg /usr/local/bin/run-alsaplayer:
> >
> > ---- cut -----
> > #!
> > alsaplayer -o jack $* || alsaplayer $*
> > ---- cut -----
> >
> > then do:
> >
> > # chmod 755 /usr/local/bin/run-alsaplayer
> >
> > Then set that as the association, it will try to run under jack,
> > then if that fails fall back to alsa.
>
> OK, this is probably the right direction to go, but I'm having some
> trouble.
>
> 1) Any audio file with spaces in the name is not handled correctly.
> After clicking on file, and then looking at alsaplayer's playlist, I
> see only the very end of the original name. If I rename the file for
> no spaces it works with jack running.
Spacey filenames should be handled ok if you change $* to "$@" as shown
below.
---- cut -----
#!
alsaplayer -o jack "$@" || alsaplayer "$@"
---- cut -----
> 2) It doesn't fall back to alsa if jack is not running. I tried
> changing the script to -o alsa, but that didn't work. Trying it from
> the command line it complains about jack not running:
This feature of the script depends on alsaplayer exiting with a nonzero
"status" (aka "$?") if it is told to use jack and jackd isn't running.
If this isn't happening, it could be considered a bug in alsaplayer (or
perhaps in jack if jack isn't returning an appropriate failure
indication to alsaplayer).
-- "Can you remember the future? Forget it!"
This archive was generated by hypermail 2b28 : Sat Dec 21 2002 - 20:04:19 EET