How to record something different from Linear PCM on iPhone

It's hard for me to record anything other than linear PCM on the iPhone :-( The samples I found (SpeakHere SDK, Zdziarski and Sadun books and one on trailsinthesand.com) use linear PCM, but I would like to use the commonly used compressed format ( without ima4 or something else ...).

I just can't figure out how to set up sample code to be used, for example, AAC, MP3 or AMR. Any suggestions and tips on how to do this are greatly appreciated!

(By the way, I don’t think that an MP3 encoder or an AMR encoder is available due to licensing problems, but AAC exists, or ???)

Edit / Update: I came across the following text in Apple's “Application Programming Guide for the iPhone,” 2009-01-06, p. 137, section: Recording audio:
"You can record audio in any of the formats listed in the" Preferred audio formats on iPhone OS (p. 140) ", and as preferred audio formats on p. 140:" For compressed sound during playback one sound at a time and when you don’t need to play the sound at the same time as your iPod, use the AAC format packed in a CAF or m4a file. "
Thus, I interpret this as an explicit indication that it is indeed, not only possible, but even more preferable to record the sound in AAC format, wrapped in an m4a file, and this is exactly what I want. But still,I can’t achieve this ?!

Thanks, / John

+5
source share
5 answers

Keep looking at these documents. In “Core Audio Essentials,” the “Basic Sound Modules: Audio Devices and Codecs” section notes that:

iPhone OS contains the recording codecs listed in Table 2-5. As you can see, neither MP3 nor AAC recording is available. This is due to the high processor overhead and subsequent drainage battery of these formats.

Table 2-5 lists several formats, but since text notes do not include the ones you are looking for. If you need these formats, you will have to bring your own encoder.

+4
source

iPhone 3GS iPod 2- . AAC. Apple, , :

iPhoneExtAudioFileConvertTest

+2

faac PCM iPhone- aac:

, -X faac ( Mac OS X), " ". ( , .)

, , linear.pcm iPhone, :

faac -XP linear.pcm

Mac, aac linear.aac.

, , faac , , C.

, , iPhone, CAF, Core Audio Format, - : Apple CAF. , linear.pcm caff.

+1

Lame mp3 encoder? faac/faad AAC? ffmpeg .

0

Why not try TPAACAudioConverter , written by the legendary Michael Tyson?

TPAACAudioConverter is a simple Objective-C class that converts any audio file to AAC-encoded m4a, asynchronously with a delegate, or converts any sound provided by the data source class (which provides recording directly to AAC).

0
source

All Articles