2008-10-31 88 views
67

我在CrashLanding示例中使用来自Apple的SoundEngine示例代码来播放多个音频文件。使用样本CAF文件包含在crashlanding一切工作正常,但是当我试图用我自己的使用afconvert我得到的是一个石头的沉默samplesconverted到CAF)使用OpenAL将音频转换为CAF格式以在iPhone上播放

没有人有afconvert的设置,将产生CAF文件能够通过OpenAL播放?

+0

以为我会推动你通过“999”的边缘,戴夫! – user279521 2010-07-28 17:24:59

回答

48

简单bash脚本到MP3转换文件夹中的文件,CAF为iPhone

#!/bin/bash 
for f in *.mp3; do 
    echo "Processing $f file..." 
    afconvert -f caff -d [email protected] -c 1 "$f" "${f/mp3/caf}" 
done 
12

这是最好的尺寸为:

afconvert -f卡福-d IMA4 original.wav

4

它看起来像-c今天不工作,我有如下得到它:

afconvert -f卡福-d LEI16输入。 m4a output.caf