Updated: 10/2/04; 11:45:24 AM.
cremes' blog
An online journal covering my experiences with I/OKit, CoreAudio and OpenDarwin.
        

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    comment []



© Copyright 2004 Chuck Remes.
 
February 2004
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29            
Jan   Mar


My Programming Project Home Pages:

Helpful Radio Links:

Click here to visit the Radio UserLand website.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.