Monday, January 6, 2014

iOS converting most audio files into iOS friendly audio files

iOS is both very generous and very picky when it comes to audio. It can play almost anything without issue but when you want to play audio in certain ways, it just won't work. Here is a quick way to convert your existing audio files to iOS friendly .caf files;

1) on the folder with your sound files in it, select it an choose 'copy'
2) press "Command-space" to open up the fast launch option on your mac
3) type "terminal" to open up a command terminal session
4) type "cd " and then "command-v" to paste the location of the directory and press enter to go to that directory
5) you can press "cd" or "ls" to confirm you are in the right directory, you should see the files you want to change there
6) type "afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf"
or "afconvert in.mp3 out.caf -d ima4 -f caff -v" with "in" being your file you want to change and "out" being the file you want to change it to.

And you are done! Don't forget to copy the new files into your application.