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,200
  • 13
  • 48
  • 64

2 Answers2

1

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

http://lame.sourceforge.net/

Brad
  • 10,916
  • 8
  • 52
  • 70
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
  • 73,270
  • 19
  • 138
  • 185
cyborch
  • 31
  • 1