[Flac-dev] Re: Core Audio player for OS X?
Brian Willoughby
brianw at sounds.wa.com
Mon Nov 14 14:37:24 PST 2005
Scott,
It is not difficult to combine the FLAC library with CoreAudio. I have
written software with object-based audio classes in Objective-C supporting
AIFF, WAVE, and FLAC. I found the FLAC library to be highly compatible with
CoreAudio. It took almost no time to get it working.
CoreAudio is primarily C, with some samples in C++, so you might prefer to use
the C version of the FLAC libraries.
I believe that AudioFileTools is designed around Apple's file translation
plugin architecture. Thus, modifying the AudioFileTools example to support
FLAC would probably require writing a file format translation plugin.
Otherwise, you'd be vastly changing the app design to directly support FLAC.
I'm not sure of the above, because I have not looked at that sample in detail,
but my hunch is that you might have an easier time modifying another sample
which is more direct in the design of its file format access.
In my case, I already had developed my own file format framework, and had the
CoreAudio player working. Adding support for FLAC was easy because I designed
the file format framework, and did not have to learn anything new except the
FLAC API.
P.S. If you do end up writing a FLAC file format translation plug (I'm not
sure what the official terminology is) for AudioFileTools, then this would be a
highly sought after plug for Mac OS X. I think it would be a significant step
towards supporting FLAC in many places throughout Mac OS X. Perhaps that's
the incentive you need to take on the slightly more difficult path!
Brian Willoughby
Sound Consultin
Begin forwarded message:
From: Scott.C.Brown.02 at Alum.Dartmouth.ORG (Scott C. Brown 02)
There are a few flac players on OS X now, but none (at least none that i know
of) seem to use Core Audio. So they all freak out if i try to play a 24/96
file.
I was recently poking around with the Tiger X Code tools and there's a simple
core audio player in there
/Developer/Examples/CoreAudio/Services/AudioFileTools/
called afplay. how hard would it be to get this thing playing flac files?
I've very new to CoreAudio, but I know there was some discussion about it
regarding flac back in July...
Scott
More information about the Flac-dev
mailing list