projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added mac sound play command
[feisty_meow.git]
/
scripts
/
multimedia
/
sound_play.sh
diff --git
a/scripts/multimedia/sound_play.sh
b/scripts/multimedia/sound_play.sh
index 72054185cd0e5e8a741b021464062e234bc57761..382d773852adfab8cca3a66c4c990127355efe05 100644
(file)
--- a/
scripts/multimedia/sound_play.sh
+++ b/
scripts/multimedia/sound_play.sh
@@
-2,7
+2,7
@@
# play the sound files specified.
# play the sound files specified.
-source "$FEISTY_MEOW_SCRIPTS/core/
functions.sh" # provides psfind.
+source "$FEISTY_MEOW_SCRIPTS/core/
launch_feisty_meow.sh"
if [ $# -lt 1 ]; then
#echo no sound file specified.
if [ $# -lt 1 ]; then
#echo no sound file specified.
@@
-11,18
+11,26
@@
fi
export PLAYCMD=/usr/bin/play
if [ ! -f "$PLAYCMD" ]; then
export PLAYCMD=/usr/bin/play
if [ ! -f "$PLAYCMD" ]; then
- PLAYCMD=
echo
+ PLAYCMD=
'echo Unknown sound player...'
fi
fi
-if [ ! -z "$(psfind artsd)" ]; then
- # we see artsd running...
+if [ ! -z "$(which afplay)" ]; then
+#echo we see afplay available...
+ PLAYCMD=afplay
+elif [ ! -z "$(psfind artsd)" ]; then
+#echo we see artsd running...
PLAYCMD=artsplay
elif [ ! -z "$(psfind esd)" ]; then
PLAYCMD=artsplay
elif [ ! -z "$(psfind esd)" ]; then
-
#
we see esd running...
+
#echo
we see esd running...
PLAYCMD=esdplay
PLAYCMD=esdplay
+elif [ ! -z "$(psfind pulseaudio)" ]; then
+#echo we see pulse running...
+ PLAYCMD="padsp aplay"
elif [ ! -z "$WINDIR" ]; then
elif [ ! -z "$WINDIR" ]; then
-
#
kludge for win32; we provide our own sound player.
+
#echo
kludge for win32; we provide our own sound player.
PLAYCMD=playsound
PLAYCMD=playsound
+else
+ echo "I don't know how to play sounds for this OS and sound system."
fi
# play the sounds individually; playsound can handle multiple files, but
fi
# play the sounds individually; playsound can handle multiple files, but
@@
-30,3
+38,4
@@
fi
for i in $*; do $PLAYCMD $i >/dev/null 2>&1; done
exit 0
for i in $*; do $PLAYCMD $i >/dev/null 2>&1; done
exit 0
+