Initial revision

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@117 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2002-10-14 23:55:51 +00:00
parent 427f29905b
commit 5389c45ca4
15 changed files with 1478 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/bin/sh
UNDUCK="./unduck"
SOX="sox"
echo "Extracting the sound data from all .duk files in the current directory."
echo "This script looks for unduck in the current dir. If it's somewhere"
echo "else, edit it to point the variable UNDUCK to the correct location."
echo "The same goes for sox, which is expected somewhere in the path."
echo "It is assumed that all sound files has a sample rate of 22050Hz"
echo "and are stereo."
echo "N.B. This program isn't fast. Make a cup of tea or something."
echo "Press ENTER when ready."
read
for FILE in *.{duk,DUK}; do
if [ ! -r "$FILE" ]; then
continue
fi
echo "File $FILE"
case "$FILE" in
*.duk)
BASE="${FILE%.duk}"
;;
*.DUK)
BASE="${FILE%.DUK}"
;;
esac
"$UNDUCK" "$FILE"
"$SOX" -c 2 -r 22050 -w -s -t raw "${BASE}.raw" -t wav "${BASE}.wav"
rm -- "${BASE}.raw"
echo
done