Diff of /tools/sound/sound2ub.sh [000000] .. [b09f68]  Maximize  Restore

Switch to side-by-side view

--- a
+++ b/tools/sound/sound2ub.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# use sox to convert a .wav file to the correct .ub file for Asteroids3D
+
+PATH="/bin:/usr/bin:/usr/sbin"
+
+FILENAME="$1"
+
+if [ "$FILENAME" = "" ]; then
+	echo "usage: sound2ub <name>.<ext>"
+	exit 
+fi
+
+FIRSTNAME=`echo $FILENAME | cut -f 1 -d .`
+NEWFILE="$FIRSTNAME.ub"
+
+echo "If everything goes okay, you should hear the same sound twice."
+
+
+echo "playing $FILENAME..."
+play $FILENAME
+
+echo "Transforming $FILENAME...to $NEWFILE"
+sox $FILENAME -c 1 -r 8000 $NEWFILE rate
+
+echo "playing $NEWFILE"
+play -c 1 -r 8000 $NEWFILE

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks