Musepack is an audio codec which is on par with Ogg/Vorbis, AAC and MP3. I wanted to do some testing, as it creates very good results in the upper bitrate ranges (160-180kb/s average).
The compilation process under Linux for Musepack is mostly broken. I had to work-around parts of the build process, as there is little to no documentation at all.
I used Fedora 14 with zsh when making this manual.
In fact, there's two ways how to do it, I'll describe both. I assume you have things like compilers, autotools, cmake etc already installed, so I'll just focus on the quirks that come up when compiling those particular packages. I recommend using the cmake solution. It's full of work-arounds but the end result is better, as it installs all shared libraries, etc.
Note: Do only either Step 1a or Step 1b! Do not do both, one after another!
Note: Do only either Step 2a or Step 2b! Do not do both, one after another!
This get's you the latest version, that resembles a release more than anything else, so it's probably not gonna crash while using it:
tar.Those are the links to the revision I used, yours might have a different revision Number):
~ $ wget http://files.musepack.net/source/musepack_src_r435.tar.gz http://files.musepack.net/source/libreplaygain_r453.tar.gz http://files.musepack.net/source/libcuefile_r453.tar.gz ~ $ tar xf musepack_src_r435.tar.gz ~ $ tar xf libreplaygain_r453.tar.gz ~ $ tar xf libcuefile_r453.tar.gz ~ $ mv musepack_src_r435 libmpc ~ $ mv libreplaygain_r453 libreplaygain ~ $ mv libcuefile_r453 libcuefile
SVN sources may be broken sometimes, but in case you're interested in testing bleeding edge software, go for this:
libmpc, libcuefile, and libreplaygain:~ $ svn export http://svn.musepack.net/libmpc/trunk libmpc ~ $ svn export http://svn.musepack.net/libcuefile libcuefile ~ $ svn export http://svn.musepack.net/libreplaygain libreplaygain
This solution doesn't use cmake, but doesn't install some shared libraries as well. I therefore advise you to go for the other solution, and take a look at Step 2b instead.
libreplaygain directory and build it with standard autotools:~ $ cd libreplaygain ~/libreplaygain $ autoreconf -vif ~/libreplaygain $ ./configure && make && sudo make install ~/libreplaygain $ cd ..
libcuefile yourself, and create the lib archive:
~ $ cd libcuefile/src
~/libcuefile/src $ for file in *c; do gcc -I../include -c -o ${file%%.c}.o $file; done
~/libcuefile/src $ ar cru libcuefile.a *o
~/libcuefile/src $ cd ../..
This should work in most shells, like bash-4.0 or zsh.
~ $ cd libmpc ~/libmpc $ autoreconf -vif ~/libmpc $ CFLAGS=-I../../libcuefile_r453/include LDFLAGS=-L../../libcuefile_r453/src ./configure ~/libmpc $ make && sudo make install ~/libmpc $ cd ..
There! That's all there is to it! I don't recommend using this solution though, since it doesn't install most of the .so files that are needed for players, or include-files you may need when compiling software that needs those libs. I therefore strongly advise you, to go for Step 2b instead! It's a little bit ugly, but you get a better result.
This solution uses cmake as intended by the developers. Problem is, there are some bugs in the build process, that need to be worked around:
libreplaygain first. We need to copy the include-files ourself:~ $ cd libreplaygain ~/libreplaygain $ cmake . && make && sudo make install ~/libreplaygain $ sudo cp -R include/replaygain /usr/local/include ~/libreplaygain $ sudo chmod -x /usr/local/include/replaygain/* ~/libreplaygain $ cd ..
libcuefile:~ $ cd libcuefile ~/libcuefile $ cmake . && make && sudo make install ~/libcuefile $ sudo cp -R include/cuetools /usr/local/include ~/libcuefile $ sudo chmod -x /usr/local/include/cuetools/* ~/libcuefile $ cd ..
CMakeLists.txt files are broken:~ $ cd libmpc ~/libmpc $ autoreconf -vif ~/libmpc $ ./configure && make && sudo make install ~/libmpc $ cd ..
And you're done!
This will provide you with all mpc* binaries, as well as libcuefile.so, libmpcdec.so, libreplaygain.so, and their headerfiles.
I worked through the build process the way it is most beneficial to me. There's another manual about it on the Musepack Trac, but it doesn't install the way I want it to, so I prefer my own solution. But in case you're curious about the official way, feel free to test it out, it shouldn't break anything.