How to convert .caf to .mp3 file programmatically on the iPhone or iPad?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-05 02:08:38

问题


is there a way to programmatically convert .caf audio files to .mp3 audio files on the iPad platform?


回答1:


There is NO way to encode TO mp3 on the iPhone. Apple does not provide the encoders for mp3, presumably due to licensing.




回答2:


OSStatus AudioConverterFillComplexBuffer(

   AudioConverterRef                   inAudioConverter,      
   AudioConverterComplexInputDataProc  inInputDataProc,   
   void                                *inInputDataProcUserData,   
   UInt32                              *ioOutputDataPacketSize,  
   AudioBufferList                     *outOutputData,  
   AudioStreamPacketDescription        *outPacketDescription  
);

Still working on an implementation, but this method is meant to be used for this conversion.

It is declared in audiotoolbox -> audioConverter



来源:https://stackoverflow.com/questions/3474547/how-to-convert-caf-to-mp3-file-programmatically-on-the-iphone-or-ipad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!