3 # play the sound files specified.
5 source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
8 #echo no sound file specified.
12 export BASIC_PLAY_CMD='echo Unknown basic sound player...'
14 if [ -f "/usr/bin/play" ]; then
15 #echo we see /usr/bin/play available...
16 BASIC_PLAY_CMD=/usr/bin/play
17 elif [ ! -z "$WINDIR" ]; then
18 #echo "kludge for win32; we provide our own sound player."
19 BASIC_PLAY_CMD=playsound
20 elif [ ! -z "$(whichable afplay)" ]; then
21 #echo we see afplay available...
23 elif [ ! -z "$(psfind artsd)" ]; then
24 #echo we see artsd running...
25 BASIC_PLAY_CMD=artsplay
26 elif [ ! -z "$(psfind esd)" ]; then
27 #echo we see esd running...
28 BASIC_PLAY_CMD=esdplay
29 elif [ ! -z "$(psfind pulseaudio)" ]; then
30 #echo we see pulse running...
31 BASIC_PLAY_CMD="padsp aplay"
32 elif [ ! -z "$(whichable pw-cat)" ]; then
33 BASIC_PLAY_CMD="pw-cat -p"
35 echo "I don't know how to play basic sound files for this OS and sound system."
38 export MP3_PLAY_CMD='echo Unknown mp3 player...'
40 if [ ! -z "$(whichable mplayer)" ]; then
43 echo "I don't know how to play mp3 files for this OS and sound system."
46 # play the sounds individually; some apps like playsound can handle multiple
47 # files, but "/usr/bin/play" doesn't want to on some systems.
48 for filename in $*; do
51 $BASIC_PLAY_CMD $filename >/dev/null 2>&1;
54 $MP3_PLAY_CMD $filename >/dev/null 2>&1;
57 echo "I don't know the file extension here: $filename"