 |
Wednesday, February 11, 2004 |
Going through the AudioCodec sample code has confused me on a pretty
basic point. How does the system know to match up a particular audio
stream with a particular codec? The AudioCodec classes have no facility
for reading/writing files, nor do I see any "probe" (like in I/OKit)
where a codec can test a stream and decide if it matches or not.
For
a hint, I looked at the OggVorbis QT component source. Even though it
is based on the Carbon Sound Manager, there's a LOT of similarity
between it and the CoreAudio stuff. Anyway, near as I can tell the only
way the system knows that a file should be handed off to the OggVorbis
component is via the filename extension (.ogg). If you remove ".ogg"
from a filename, you can't play it from QT, import it into QT, preview
it from the Finder, or drag-n-drop it into iTunes. That's because the
.ogg extension is defined as part of the QT Importer/Exporter
interface. Do I really need to write those too just to test?
Any hints on how to proceed would be appreciated.
10:20:02 PM
|
|
© Copyright 2004 Chuck Remes.
|
|
|