Re: AudioFile.h
Re: AudioFile.h
- Subject: Re: AudioFile.h
- From: Chris Reed <email@hidden>
- Date: Wed, 23 Apr 2003 12:06:59 -0500
I almost forgot to post the results of my "experimentation".
I discovered that in 10.2.5, AudioFileOpen will indeed succeed in
opening an mp3 file. Unless I really wasn't paying attention, it used
to fail for mp3s prior to 10.2.5.
The AudioStreamBasicDescription that you get out of it has the
mFormatID set to 'mp3 '. The sample rate was set to 44100.0 for the
files I looked at. And mBytesPerPacket was set to 1152. All other
fields were zeroed out (I think--going from memory here).
The upshot of this is that if you had code using the AudioFile API and
weren't checking the format ID, people will be able to "open" mp3s with
your code, undoubtedly causing unpleasantness like crashes.
-chris
On Tuesday, Apr 22, 2003, at 14:11 US/Central, Bill Stewart wrote:
The AudioFile code will currently only deal with non-compressed data
reliably and AIF/WAVE/SD2 should all work the same. We are doing some
more work in this area that we'll be going over in some detail at WWDC
We did fix the bug in 10.2.5 for the CD files (it was a mismatch on
the resource if I remember correctly).
Bill
On Monday, April 21, 2003, at 08:23 PM, Chris Reed wrote:
Matt,
Something is wrong with either the audio files you are using or your
use of the AudioFile API. AIFF and WAV files work just fine with all
other software I've seen using the AudioFile calls (including my
own). There were some reports of a bug with AudioFile and aifc files
in CD audio format (can't remember which endian that is, little?),
though.
But what's weird is that as far as I knew (And John, that's why he
asked I would guess), mp3 files are *not* supported. Nor is any other
compressed format.
So.. what OS version are you using? 10.2.5?
CA team: was support for mp3 and/or other compressed audio formats
added to the AudioFile API?
Guess it's time to do some experimenting... :)
-chris
On Monday, Apr 21, 2003, at 21:41 US/Central, matt ingalls wrote:
Hey Matt, the AudioFile API works with MP3? Does it do the
decompression itself?
it returns a buffer in 'mp3 ' stream format - maybe you can pass it
through an AudioConverter routine?- but i haven't tried --- im more
interested in aiff and wav file support at the moment - but for
those
formats, kAudioFilePropertyDataFormat returns an empty stream
description and AudioFileReadPackets() does not return any frames.
AudioFileReadBytes() appears to work, but all the header info is
in there - so its not much use...
Matt;
________________________
matt ingalls
http://sonomatics.com/matt.html
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
-- mailto:email@hidden
tel: +1 408 974 4056
_______________________________________________________________________
___
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
_______________________________________________________________________
___
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.