Wiki

The SoundFileLib is based on libsndfile. The libsndfile library does the heavy lifting of dealing with the bazillion different file formats used for audio. To include support for FLAC, we have to compile libflac, and it depends on libvorbis which depends on libogg. So we have to build all of this stuff into static libraries. Furthermore, the static libraries need to be universal binaries supporting both 32-bit (e.g. for Max) and 64-bit (e.g. for Ruby) architectures.

As a base option, we can use libsndfile from http://www.mega-nerd.com/libsndfile/More complicated, but we could use LAME (which uses:), or directly use http://www.mpg123.de/ -- there are a host of complications though. Conflicting versions, dependencies, licensing, etc. And to supporting anything with MP3 we have to be scared about patents and lawyers.FFmpeg is another option. It is supposed to be a new and improved libsndfile, supporting various media formats. However, check this out: https://roundup.ffmpeg.org/roundup/ffmpeg/issue732 -- I don't think I want to get into this. If we did, examples can be found @ http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html,gmerlin stuff is GPL, so it's not an optionmaybe there is something to research in libSox? http://sox.cvs.sourceforge.net/viewvc/sox/sox/wrapping Apple's AudioQueue API would be an easy and full-featured on solution on the Mac, but of course is not available on other platforms.One proposal is to wrap Apple's stuff on the Mac and libsndfile on other platforms. libsndfile supports CAF format, so that could be our 'native' format on both platforms if we wish. Then "only" MP3, AAC, etc. become problems on Windows (but they would be problematic due to licensing anyway).

That complains about not having XMMS. Not sure if this is important or not? Ignoring it for now...

make

Fails when linking : despite us telling it to use static linking, it is looking for /usr/local/lib/libogg.dylib. I can't find where this is specified in any makefile or other file. So for now we can build with the "--disable-ogg" flag. Not sure if that is bad to do in the long term though?

Further problems exist because we can't build libFLAC as a universal binary! We have to build one architecture at a time and manually lipo them together.

And then it still doesn't build a 32-bit binary (on a 64-bit machine), giving more internal linker errors!

So trying to just run ./configure --enable-static --disable-shared --disable-ogg and then making yields ranlib errors -- but I thought ranlib was obsolete and never needed on the mac anymore? And furthermore, it looks like it produced a 32/64 bit UB!!! Sheesh.

Trying again, now with ogg, it works, except for the bogus(?) ranlib problems. Because of that, we can't do a 'make install'. So...

libsndfile turns out to be complete disaster thanks to the hard-core FLOSS religion. In fact, there is even code in it to make certain that you can't compile it as a universal binary -- verrrrry impressive! So we have an Xcode project in the SoundfileLib folder and can compile from there.