The rumour about FLAC support in Leopard started appearing more than one year ago. As rumours go, that one was pretty vague - nonetheless some people managed to infer that iTunes would support it as well, naturally. I must admit that at some point, due to a certain person that shall remain unnamed, I got quite confused myself.
On Friday Leopard has been released. Yesterday I’ve spoken on IRC about the FLAC support with some users that already have 10.5. Then I played with the developer kit for Mac OS X 10.5, now available to everybody. And I have my answer.
Xcode 3.0 developer kit contains some new examples in /Developer/Examples/CoreAudio. One of them is an example implementation of AudioCodec compressor and decompressor for FLAC streams (as in “streams of logically related bits” not “network streams”). To build that codec you would need to, following included README, download FLAC source distribution, copy some of the source files into a subdirectory in the example AudioCodec implementation, edit one of the copied files and build the whole thing in Xcode. After it builds the resulting bundle needs to be copied into /Library/Components. From the README: “You now have a working FLAC encoder and decoder on the system.”
Right. What you still don’t have is any way to extract those FLAC-formatted bit streams from the files FLAC usually comes in, like .flac or occasionally .ogg files, to be able to use your new and shiny codec to decode them. You still don’t have a way to put those FLAC-formatted bit streams into a .flac or .ogg file. Possibly 10.5 comes with some tools, or some more D.I.Y. examples, to manipulate CoreAudio Files (.caf) or maybe even QuickTime (.mov) files, so you can store and extract those FLAC-formatted bit streams in/from those Apple-specific file formats. But still, neither QuickTime Player nor iTunes won’t be able to play .flac files even if you build and install the example codec.
And that’s it. That’s the FLAC “support” in Leopard, as far as I know. Expected more? Sorry, move along.
If you are a XiphQT user you had the same “support” for FLAC decoding more than a year ago, when version 0.1.5 had been released. Except it included support for FLAC in .ogg files. I know, to many people that’s next to useless, but still. And XiphQT’s code for decoding FLAC is roughly half the size of the Apple’s example and doesn’t have loops copying data between interfaces sample by sample! Even a simple thing like multi-channel mappings is incorrect in their implementation - they either didn’t bother to read the FLAC specification or didn’t bother to implement it properly, because it’s hard to believe they don’t know how to use their own API. Nice “example” Apple!
At this point there’s only one more thing left to write. Expect native FLAC file format support in XiphQT soon.