I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;)
Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL?
You can open CAF files with various audio players, including QuickTime Player 7 and later (included with macOS), VideoLAN VLC media player (multiplatform), Audacity (multiplatform), and NCH WavePad (multiplatform).
iTunes doesn't support . caf file format. However you could try a program called Switch.
The audio format that Capture records within it's CAF files is Apple Lossless Audio Codec or ALAC. This is Apple's own version of a lossy compression format. Lossless audio formats contain the same data as it's full size equivalent so there is no loss of audio quality when using the ALAC audio format.
afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf
References:
afconvert -h
for complete info)Simple bash script to convert the mp3 files in a folder to caf for iphone
#!/bin/bash for f in *.mp3; do echo "Processing $f file..." afconvert -f caff -d LEI16@44100 -c 1 "$f" "${f/mp3/caf}" done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With