Re: afinfo / ExtAudioFile relies on file extensions?
Re: afinfo / ExtAudioFile relies on file extensions?
- Subject: Re: afinfo / ExtAudioFile relies on file extensions?
- From: Doug Wyatt <email@hidden>
- Date: Wed, 25 Jan 2006 12:48:55 -0800
The Audio File API does use the HFS type as part of how it identifies
a file's type. This helps especially with Sound Designer II files,
which tend not to be identifiable by extension, and AIFF's that were
created on Mac OS 9 without extensions.
But in general I think we put a higher precedence on the file's
extension, since there has been a decided move away from HFS type
codes on Mac OS X ...
In this case it looks like the API ought to at least try M4A after
the attempt to open the file as an MP3 fails. Please feel free to
write a bug.
Doug
On Jan 24, 2006, at 8:17, Brian Whitman wrote:
In our app we use ExtAudioFile API to do "anything to PCM" conversion.
We have a few files in our testbed that are mis-named; i.e. m4a
files renamed as .mp3 files. For example, we have a file called
lily.mp3 that is:
file: "/Users/bwhitman/Desktop/lily.mp3"
type: "M4A "
creator: "hook"
iTunes and QT read and play the file fine, no problem. But afinfo
and our code to open the file fails with a "dta?" error. If I
rename the file to the (correct) lily.m4a, it works fine. I can
never remember what the latest advice is on filename extensions vs.
type/creator codes-- what's the recommended solution for this sort
of problem? Is it a "bug" that the API doesn't handle this, or is
it something we need to write wrappers for?
--
http://variogr.am/
--
Doug Wyatt
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