使用OpenAL将音频转换为CAF格式以在iPhone上播放
我在CrashLanding示例中使用来自Apple的SoundEngine示例代码来播放多个音频文件。使用样本CAF文件包含在crashlanding一切工作正常,但是当我试图用我自己的使用afconvert我得到的是一个石头的沉默samplesconverted到CAF)使用OpenAL将音频转换为CAF格式以在iPhone上播放
没有人有afconvert的设置,将产生CAF文件能够通过OpenAL播放?
afconvert -f caff -d [email protected] -c 1 in.wav out.caf
参考文献:
我可以问你在哪里或在哪里找到答案? – 2008-10-31 22:54:59
我还问了关于官方iPhone SDK论坛 – 2008-11-01 08:11:11
@KristopherJohnson这个问题的两个链接断了。 – 2014-03-07 06:09:37
感谢信息。
还,如果你正在寻找与OpenAL的额外的压缩,这可能会感兴趣:
“iPhone,OpenAL的,和IMA4/ADPCM” http://www.wooji-juice.com/blog/iphone-openal-ima4-adpcm.html
简单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
这是最好的尺寸为:
afconvert -f卡福-d IMA4 original.wav
它看起来像-c今天不工作,我有如下得到它:
afconvert -f卡福-d LEI16输入。 m4a output.caf
以为我会推动你通过“999”的边缘,戴夫! – user279521 2010-07-28 17:24:59