Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert .m4r/.mp3 to .caf/.aiff in iphone app

Tags:

iphone

As of right now I am using ffmpeg to convert from .mp3 --> to .aiff but I would like a native way to do this in xcode but i do not understand how to use AudioConverter.h in AudioToolbox soo if someone could please help me I would be really appreciative.

Thank You Enea

like image 974
Enea Avatar asked Oct 29 '09 00:10

Enea


People also ask

How do I convert M4A to MP3 on iPhone?

Convert M4A to MP3, WAV on iPhoneTap to select the audio recording, you will see the play control bar at the screen bottom. Touch the Edit icon at the right corner to open the Edit screen. Tap the Edit icon again to pop up the File Format menu. You can find WAV, M4A, M4R and MP3 from the menu list.


2 Answers

ExtAudioFile can do a fantastic job of this. One reason to take some compressed formats like MP3 and convert to PCM is that there is much less of a latency when playing the sound. An MP3 sound effect, for example, can take close to a second to start playing back, when the same sound in PCM could start almost immediately. I know since I am converting my sounds to PCM at launch time and eliminating the delays I was plagued with.

Go download iPhoneExtAudioFileConvertTest and you will find everything you need to do your own conversions

like image 116
mahboudz Avatar answered Sep 30 '22 09:09

mahboudz


I think the real question is why would you want to? The iphone and AudioQueue has full mp3 support for playback and mixing. I know of no way to do this on the fly in the iPhone. It is a fairly processor intensive task and I doubt you could do it efficiently on the iPhone anyway.

like image 28
coneybeare Avatar answered Sep 30 '22 09:09

coneybeare