[Flac-dev] Detecting FLAC file type

Brian Willoughby brianw at sounds.wa.com
Tue Oct 6 17:15:22 PDT 2009


I had the same issue, and decided to just write my own code.

If you're really set on using the API, then perhaps you should take a  
look around.  The source code is available, and maybe you can find  
the routine where the magic number is checked.  I have a bad feeling  
that this might not be a public API, once you find it, but there's a  
chance.  Besides, at least you can model you own code after the  
official code if there isn't a public API.  In any event, I don't  
suggest calling an undocumented API entry point, even if you find it.

Sorry for the non-answer, especially since I never looked into this  
myself, but you do have more options with open-source API than you do  
with other API.

Brian Willoughby
Sound Consulting


On Oct 6, 2009, at 13:11, Shayne Wissler wrote:
> I know there is a "fLaC" at the beginning of the FLAC file, and I can
> easily look for that, but my design sense was that it's better to have
> the FLAC API vet the file type rather than having my code do it.



More information about the Flac-dev mailing list