Re: AudioCodec: auto-magic file id & iTunes
Re: AudioCodec: auto-magic file id & iTunes
- Subject: Re: AudioCodec: auto-magic file id & iTunes
- From: Stephen Davis <email@hidden>
- Date: Fri, 6 Feb 2004 15:28:24 -0800
On Feb 6, 2004, at 1:48 PM, Brian Willoughby wrote:
I share Chuck's vision of iTunes support for FLAC (see archives from
June
2003), but how will iTunes (or any other application, for that matter)
know to
select the FLAC Codec for a particular file or stream?
The _application_ won't. See below.
Is there some part of an AudioCodec which will return a boolean test
of a
stream as to whether it can be decoded by that Codec or not? I know
that FLAC
files and FLAC streams have identifiers in them (magic number 'fLaC'),
but what
part of the system will be looking for these?
I don't believe so and no one.
If you want "all" apps to recognize FLAC files then you will probably
need to write a QT importer component. Writing an AudioCodec and, by
extension, a Sound manager codec component, only allows the system to
call that codec for data _known_ to be of that format. To deal with
the the file format, you must:
1a) Write a QT importer for the FLAC file format so that QT can load
the files
OR
1b) Package FLAC data in a QT file and set the audio format to 'fLaC'
or whatever
2) Write a codec to handle that format type
QT files can handle arbitrary codec types as long as there is a codec
component to handle them so if you package up the FLAC data in a QT
movie correctly, you're good to go. However, it sounds like you want
the existing file format to be played so you will have to write a QT
importer to handle the file level details and a codec to handle the
actual data.
I do not know if the AudioFile API has provisions for plugins to add
support for unknown codec types.
What about filename extensions? Any provision for the system to inform
applications of mappings from filename extensions to a particular
AudioCodec?
QT importer again.
I understand that installing a new AudioCodec on a system will make it
available to all applications that use AudioConverter, but it seems
like it
will still be up to every application to be rewritten to open a FLAC
file, look
for the magic number, and then specifically request the appropriate
Codec.
That is correct, unless QT knows how to play the files and the app uses
QT. Just having an AudioCodec isn't sufficient b/c it is not
responsible for parsing the file to get to the compressed data.
I'm thinking primarily of playback of an existing FLAC-encoded file.
Is there
some mechanism where an application can present this file (or stream)
to the
AudioConverter, and have CoreAudio pick the appropriate decoder? I've
not seen
anything along these lines.
I don't think so. Note that I am not an expert on QT importers so I
may not be completely correct in the above claims but that's the
general idea.
stephen
_______________________________________________
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.