Skip to content

Instantly share code, notes, and snippets.

@paulofierro
Last active June 4, 2016 02:31
Show Gist options
  • Save paulofierro/8815785 to your computer and use it in GitHub Desktop.
Save paulofierro/8815785 to your computer and use it in GitHub Desktop.
Convert WAV to CAF
##
## Shell script to batch convert all files in a directory to caf sound format for iPhone
## Place this shell script a directory with sound files and run it: 'sh afconvert_wavtocaf.sh'
##
## If only converting one then:
## afconvert -f caff -d ima4 FILENAME.WAV
##
## Via http://stackoverflow.com/questions/8769851/convert-multiple-wav-to-caf
for f in *.wav; do
if [ "$f" != "afconvert_wavtocaf.sh" ]
then
afconvert -f caff -d ima4 $f
echo "$f converted"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment