Re: Questions regarding output from afinfo
Re: Questions regarding output from afinfo
- Subject: Re: Questions regarding output from afinfo
- From: Jeff Moore <email@hidden>
- Date: Thu, 6 Aug 2009 12:11:03 -0700
On Aug 6, 2009, at 10:16 AM, Michael A. Crawford wrote:
Thanks, Jeff. I'm new to Core Audio so I had no idea this utility
was available.
No worries. Welcome!
Next question:
Consider the following output from afinfo:
File: howarddean.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: 22.000 sec
audio bytes: 357901
audio packets: 856
bit rate: 128000 bits per second
packet size upper bound: 1052
maximum packet size: 418
audio data file offset: 499
optimized
Is this reasonable?
Yes.
I assume 0 bits/channel is because there is no channel layout? How
can there be 0 bytes/packet and 0 bytes/frame? This doesn't seem
valid, unless it is because the data is compressed and needs to be
decompressed before these properties make sense?
This is signifying that you are dealing with data encoded into the
variable bit rate form of mp3. Essentially, the description is saying
that each packet if MP3 data will be in packets that have a duration
of 1152 sample frames but whose size in bytes varies from packet to
packet.
Anyone care to help me understand this? What am I missing?
The AudioStreamBasicDescription is one of the more important data
structure. It is used throughout our API set to describe data formats.
Understanding it is probably the first thing you want to do when you
are first picking up our APIs.
If there is a document that will clear this up please point me at it
and I'll read it.
The ASBD is covered pretty thoroughly in most of our documentation.
I'd start at http://developer.apple.com/audio/ and go from there.
Also, you might want to dig up my talk from WWDC from 2008. I spent a
good deal of time going through the ins and outs of this data
structure and the ways it is used in the various APIs.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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