• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Loop Audio on iPhone
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loop Audio on iPhone


  • Subject: Re: Loop Audio on iPhone
  • From: Marco Papa <email@hidden>
  • Date: Mon, 23 Feb 2009 20:08:02 -0800

On Mon, Feb 23, 2009 at 1:17 PM, William Stewart <email@hidden> wrote:

The difference in size is HUGE in an environment like the iPhone. In my case, this is the comparison:

Original looping WAV: 2.4MB
looping IMA4-CAF:  658KB
looping MP3: 384KB


For the sake of clarity

These differences are expected and have nothing to do with the particular file type that is used (CAF, WAV, MP3) but rather is all about the data format:

Linear PCM (in the WAV file) is the uncompressed version

IMA4 (in the CAF file) is a compressor that provides a 4 to 1 compression ratio:
 (so 658KB * 4 is about the size of the uncompressed audio as you would expect)

The MP3 data is about 6.25 times smaller than the linear pcm (uncompressed) - which implies a bit rate of around 192 kbps (or bigger) I guess (if this were 44.1K, stereo 16bit to start with) - its hard to tell exactly because you don't describe the characteristics of the source file.

Bill


Absolutely, Bill. Here are the details on running "afinfo" on each of the tree files:

1.  JungleWaterfall.wav 2.4MB

$ afinfo JungleWaterfall.wav
File:           JungleWaterfall.wav
File type ID:   WAVE
Data format:     2 ch,  44100 Hz, 'lpcm' (0x0000000C) 16-bit little-endian signed integer
                no channel layout.
estimated duration: 14.174 sec
audio bytes: 2500252
audio packets: 625063
bit rate: 1411200 bits per second
packet size upper bound: 4
audio data file offset: 44
optimized
----

2. JungleWaterfall_ima4.caf 658KB

$ afinfo JungleWaterfall_ima4.caf
File:           JungleWaterfall_ima4.caf
File type ID:   caff
Data format:     2 ch,  44100 Hz, 'ima4' (0x00000000) 0 bits/channel, 68 bytes/packet, 64 frames/packet, 0 bytes/frame
                no channel layout.
estimated duration: 14.174 sec
audio bytes: 664156
audio packets: 9767
audio 625063 valid frames + 0 priming + 25 remainder = 625088
bit rate: 374850 bits per second
packet size upper bound: 68
audio data file offset: 4096
optimized
----

3. JungleWaterfall.mp3 384KB

$ afinfo JungleWaterfall.mp3
File:           JungleWaterfall.mp3
File type ID:   MPG3
Data format:     2 ch,  44100 Hz, '.mp3' (0x00000000) 0 bits/channel, 0 bytes/packet, 1152 frames/packet, 0 bytes/frame
                no channel layout.
estimated duration: 13.000 sec
audio bytes: 390617
audio packets: 542
bit rate: 220000 bits per second
packet size upper bound: 1052
maximum packet size: 835
audio data file offset: 0
optimized
----


--
Marco Papa, Ph.D.
Computer Science Department
University of Southern California
Henry Salvatori Computer Center
Los Angeles, California 90089-0781
Voice: +1-213-974-2137
Cell: +1-310-944-5468
E-mail: email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Loop Audio on iPhone (From: Marco Papa <email@hidden>)
 >Re: Loop Audio on iPhone (From: Marco Papa <email@hidden>)
 >Re: Loop Audio on iPhone (From: William Stewart <email@hidden>)

  • Prev by Date: RE: Set Volume for Recorder Queue
  • Next by Date: Re: Render Buffer Sizes Usually Consistent?
  • Previous by thread: Re: Loop Audio on iPhone
  • Next by thread: How to define customized notification from kernel-space to user-space
  • Index(es):
    • Date
    • Thread