]> git.zerfleddert.de Git - micropolis/commitdiff
inform user, when no audio player is found
authorMichael Gernoth <michael@gernoth.net>
Sun, 13 Jan 2008 23:01:03 +0000 (00:01 +0100)
committerMichael Gernoth <michael@gernoth.net>
Sun, 13 Jan 2008 23:01:03 +0000 (00:01 +0100)
do not print all played files to the console

res/micropolis.tcl
res/sounds/player

index 7b65a4c38623c0d1e04532a5804faee174b05dfc..dac3517d84f444af64c499f9cbbc7eeba4d91f0e 100644 (file)
@@ -940,7 +940,7 @@ proc EchoPlaySound {soundspec} {
   # Temporary workaround to tell Python Sugar app to play sound.
   global Sound
   if {$Sound} {
-    echo PlaySound [lindex $soundspec 0]
+    #echo PlaySound [lindex $soundspec 0]
     signal ignore SIGCHLD
     exec res/sounds/player res/sounds/[string tolower [lindex $soundspec 0]].wav &
   }
index 7784940d8eb5ef608f5b49d87dabef459f2673be..af26836209fb6819399f13f00d7b5c14f59db628 100755 (executable)
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
 
-PLAYER=true
+PLAYER=
 
 if [ -x "`which aplay`" ]; then
        PLAYER=aplay
@@ -10,4 +10,13 @@ elif [ -x "`which mplayer`" ]; then
        PLAYER="mplayer -nogui -nocache"
 fi
 
-exec ${PLAYER} "$@" >/dev/null 2>&1
+if [ "x${PLAYER}" = "x" ]; then
+       echo "Can't find audio player!"
+       echo "Please make sure you have aplay, play or mplayer in your path."
+       if [ "`uname`" = "Darwin" ]; then
+               echo "A working play for OS X is available from:"
+               echo "http://www.hieper.nl/html/play.html"
+       fi
+else
+       exec ${PLAYER} "$@" >/dev/null 2>&1
+fi
Impressum, Datenschutz