How to convert .caf to .mp3 file programmatically on the iPhone or iPad?
is there a way to programmatically convert .caf audio files to .mp3 audio files on开发者_Python百科 the iPad platform?
There is NO way to encode TO mp3 on the iPhone. Apple does not provide the encoders for mp3, presumably due to licensing.
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
精彩评论