I know it's not 100% correct (specially the encoding/decoding and copying parts) but it currently compiles and plays all files I threw at it (most formats). I left some room for improvement, specifically the case where libsndfile is not found I'm working on writing fall back code that would be able to read some AIFF, AIFC, AU/SND and WAV files without needing any external libraries (by my calculations, would end up being between 300-400 additional lines of code).
Thanks Stefan
PS: Please go easy on the way I write code, I'm a Mechanical
Engineer... I already know the code may not be well written. Just let
me know what would need to be improved and I'll give it a try.