0

I am trying to create an MP3 audio file on the device (iPhone).

I have found that there is no possibility to record directly in MP3 format.
Only .caf file that may contain AIFF, Linear PCM etc.

I have also found here that there is an AudioConverterFillComplexBuffer function that might, theoretically, convert CAF file to MP3, but I can't find any sample code or explanation on how to use this function.

Any help will be greatly appreciated.

-- Michael Kessler

Community
  • 1
  • 1
Michael Kessler
  • 14,245
  • 13
  • 50
  • 64

2 Answers2

1

Try using LAME - open source MP3 encoder library (liblame)

http://lame.sourceforge.net/

Brad
  • 11,262
  • 8
  • 55
  • 74
1

As far as I know LAME is GPL which may be an issue for you if you are building an iPhone app.

I believe AudioConverterFillComplexBuffer indeed is the way to go. You might want to take a look at the book "Core Audio Rough Cuts" which has explanations and examples on how to convert audio.

Good luck.

Mrchief
  • 75,126
  • 20
  • 142
  • 189
cyborch
  • 31
  • 1