Exporting Audio File to CAF

转载自:http://www.permadi.com/blog/2009/05/exporting-audio-file-to-caf/

iPhone likes CAF (Core Audio Format), but how do you create or convert to a CAF file?

1) Use the afconvert tool from Apple. 

This is a command line application that you need to run from the shell prompt. Example:

 
 
1
2
afconvert -f caff -d LEI16 myAudio1.wav myAudio1.caf
afconvert -f caff -d ima4 myAudio2.wav myAudio2.caf

Documentation: http://developer.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/afconvert.1.html
To batch multiple files, I have found it useful to write a batch file



2) Alterativey,

audacity-logo-r_50pctI use the free audio editor Audacity, which can be downloaded from: http://audacity.sourceforge.net/

Note, that version 1.2.6 does not export to CAF, but 1.3.7 does (caveat: it’s currently still in Beta).

To convert to CAF, do File->Export.  Select Other uncompressed files, then click the Options… button.  Another dialog will pop-up where you can select CAF (Apple Code Audio File).

audacitycaf

Link to CAF specification:http://developer.apple.com/documentation/MusicAudio/Reference/CAFSpec/CAF_intro/CAF_intro.html#//apple_ref/doc/uid/TP40001862-CH203-DontLinkElementID_60.

Note

Using afconvert seems to be more reliable.


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值