Improving Workflow in Audio Preparation for iPhone SDK development

April 18, 2009 § Leave a comment

Apple offers command line on Mac OS X to convert multiple files to preferred audio format for iPhone in CAF (Apple Core Audio File).

However, very often your raw audio files are not production-ready. It means that it requires optimization. You would need to use many optimized audio files so your audio files won’t be CPU-intensive, taking up too much memory, or even halt the application.

Audacity allows you to edit the audio and export it to preferred audio format without taking extra steps on command line.

You can set your preference. Select CAF (Apple Core Audio File) as Header. You can select Encording Signed 16 bit PCM.

Other options:

  • Signed 8 bit PCM
  • Signed 16 bit PCM
  • Signed 24 bit PCM
  • Signed 32 bit PCM
  • Unsigned 8 bit PCM
  • 32 bit float
  • 64 bit float
  • U-LAW
  • A-LAW
  • GSM 6.10
  • 32kbs G721 ADPCM
  • 24kbs G723 ADPCM
  • 12 bit DWVW
  • 16 bit DWVW
  • 24 bit DWVW
  • 16 bit DPCM
  • 8 bit DPCM

Other combination options:

  • AIFF (Apple/SGI 16 bit PCM)
  • AIFF (Apple/SGI 32 bit PCM)
  • AIFF (Apple/SGI 8 bit PCM)

This is important to note that you are exporting Uncompressed Export Format. Keep in mind that you won’t be able to play multiple compressed audio files.

My experience is don’t try to use the highest quality audio hoping the app will adjust the audio play experience. Highest audio sample rate 96,000 Hz, theater quality, probably won’t deliver the same hearing experience. 44,100 Hz is the CD quality for music. 8,000 Hz is for voice recording.

Audacity Sample Rate Options:

  • 32-bit float
  • 24-bit
  • 16-bit

Audacity 7 Standard Rate Options:

  • 96,000
  • 44,100
  • 22,050
  • 16,000
  • 11,025
  • 8,000

Most iPhone SDK recording app is using 8,000 Hz for voice digital recording on iphone.

SampleRate is the number of samples that will be captured per second.

FormatID is used to set the codec (compressor/decompressor) that will be used for recording. PCM stands for Pulse-code modulation and is uncompressed audio data.

RecordState audio;

audio.dataFormat.SampleRate = 8000.0;
audio.dataFormat.FormatID = kAudioFormatLinearPCM;
audio.dataFormat.FramesPerPacket = 1;
audio.dataFormat.ChannelsPerFrame = 1;
audio.dataFormat.BytesPerFrame = 2;
audio.dataFormat.BytesPerPacket = 2;
audio.dataFormat.BitsPerChannel = 16;
audio.dataFormat.Reserved = 0;
audio.dataFormat.FormatFlags =
                kLinearPCMFormatFlagIsBigEndian |
                kLinearPCMFormatFlagIsSignedInteger |

At this point there is very little to almost none information on best practices and audio combination in optimized music or audio-intensive iPhone SDK Applications.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

What’s this?

You are currently reading Improving Workflow in Audio Preparation for iPhone SDK development at Web Builders.


%d bloggers like this: