Convert build system to use cmake and fix for Mac OS X build

As above. Please test.

Mac OS X does not have any audio device in /dev, but rather Core Audio needs to be used. What would be the best way to fix this? Should I use something like portaudio for cross platform audio support?

What I'll probably do first is implement libsndfile support for processing recorded .wavs, as this would make reverse-engineering codecs much easier. What do you think?