Added WAVE file output to AIFF converter; fixed AIFF decoding bug which caused 8 extra samples in the output
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3609 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+8
-11
@@ -1,25 +1,22 @@
|
||||
#!/bin/sh
|
||||
AIF2RAW="./aif2raw"
|
||||
SOX="sox"
|
||||
AIF2WAV="./aif2wav"
|
||||
|
||||
echo "Converting all aif files in the current directory to wav files."
|
||||
echo "This script looks for aif2raw in the current dir. If it's somewhere"
|
||||
echo "else, edit it to point the variable AIF2RAW to the correct location."
|
||||
echo "The same goes for sox, which is expected somewhere in the path."
|
||||
echo "This script looks for aif2wav in the current dir. If it's somewhere"
|
||||
echo "else, edit it to point the variable AIF2WAV to the correct location."
|
||||
echo "It's just supposed to work once on a specific set of files, and hence"
|
||||
echo "is pretty fragile."
|
||||
echo "It is assumed that all aif files have a sample rate of 11025."
|
||||
echo "If this is not the case, files won't be converted correctly."
|
||||
echo "The sample rate is reported, so you can see if it goes wrong."
|
||||
|
||||
echo "Press ENTER when ready."
|
||||
read DUMMY
|
||||
|
||||
for FILE in *.aif; do
|
||||
for FILE in `find . -type f -name "*.[aA][iI][fF]"`; do
|
||||
echo "File $FILE"
|
||||
# This is lame and does not handle "Aif", but I
|
||||
# do not want to mess with it too much
|
||||
BASE="${FILE%%.aif}"
|
||||
"$AIF2RAW" "$FILE" "${BASE}.raw"
|
||||
"$SOX" -c 2 -r 44100 -w -s "${BASE}.raw" "${BASE}.wav"
|
||||
BASE="${BASE%%.AIF}"
|
||||
"$AIF2WAV" "$FILE" "${BASE}.wav"
|
||||
echo
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user