I have an Audio Queue working to record PCM, but I cannot get it to work for mp3. When I change the mFormatID to kAudioFormatMPEGLayer3, my callback function is never fired. I am using the example from the documentation.
Asked
Active
Viewed 2,015 times
2 Answers
4
The mp3 encoder is not bundled in iOS as far as I know as it's a patented algorithm. You can only decode (playback) mp3 audio.
Consider using ffmpeg or some other encoder on the server side to transform the audio to mp3.
1
Anurag is right: Core Audio won't encode MP3. Your approach will work for other CA-supported compressed codecs, like AAC and ALAC.

invalidname
- 3,175
- 21
- 18