将音频转换为CAF格式,以便使用OpenAL在iPhone上播放 [英] Converting audio to CAF format for playback on iPhone using OpenAL
本文介绍了将音频转换为CAF格式,以便使用OpenAL在iPhone上播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在CrashLanding示例中使用Apple的SoundEngine示例代码来播放多个音频文件。使用CrashLanding附带的示例caf文件一切正常但是当我尝试使用我自己的样本使用afconvert转换为CAF时,我得到的是一个沉默的石头;)
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 ;)
有没有人有afconvert的设置会产生一个能够通过OpenAL播放的CAF文件吗?
Does anyone have settings for afconvert that will produce a CAF file capable of being played back through OpenAL?
推荐答案
afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf
参考文献:
- Apple的多媒体编程指南:使用音频:iOS中的首选音频格式
- afconvert(1)man页面(使用
afconvert -h
获取完整信息)
- Apple's Multimedia Programming Guide: Using Audio: Preferred Audio Formats in iOS
- afconvert(1) man page (use
afconvert -h
for complete info)
这篇关于将音频转换为CAF格式,以便使用OpenAL在iPhone上播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文