FMOD and Compiling ZDoom

After compiling ZDoom from source (using the SVN repository, as recommended), which was a little bit of an adventure in itself (it requires a bit more than the regular ./configure; make; make install routine), I fired it up to discover that, no matter what settings I used, sound was only coming through the right channel. The only way to change this was to set the sound to mono, which had the effect of turning the sound of completely. I thought I’d type up a few notes on how I went about fixing the problem, in case anybody else comes across a similar situation (or, for when I come across the same situation again and draw a complete mental blank).

After some searching, most of the information I could find related to the sound not working at all or issues with the music. Digging a little deeper, it seems that the version of FMOD used at compile time can have a significant effect. The version listed in the ZDoom Wiki is 4.28.00, which seemed to be causing the strange behavior. I downloaded the latest stable, which (at the time of writing) is 42.28.02 and then again followed the compilation instructions on the ZDoom Wiki, with the following changes:

Firstly, download the newer FMOD source –

I extracted with tarball to the /trunk/ directory in the ZDoom source. Note that unless you’ll be leaving the FMOD source in that exact spot, it’s better to extract it somewhere you’ll leave it, like /opt/fmod. The reason for this is that the resulting build of ZDoom will look for the FMOD libs in that path, and will refuse to start if you suddenly move the files (as I discovered after a bit of tidying up suddenly rendered the game unplayable).


mkdir /opt/fmod
cd /opt/fmod
tar zxvf /path-to-fmod-download/fmodapi42802linux64.tar.gz

Note: The directories are examples only, obviously. The filenames for FMOD are based on the 64-bit version, so if you have the 32-bit you’ll need to modify accordingly. The same applies to the compile time flags listed in the next step.

I then ran CMake in the /release/ directory, using two flags to let ZDoom know where FMOD’s lib and inc are:

  1. cd /path-to-zdoom-download/trunk
  2. mkdir release
  3. cd release
  4. cmake -DFMOD_LIBRARY=/opt/fmod/fmodapi42802linux64/api/lib/libfmodex64-4.28.02.so
    -DFMOD_INCLUDE=/opt/fmod/fmodapi42802linux64/api/inc -DCMAKE_BUILD_TYPE=Release ..

Let the process complete and, if there are no errors (for missing dependencies, check here), run make and then go and make a coffee while it compiles. All things being well, you should wind up with a zdoom executable with which you can launch your favorite iwad. Use the following to launch DOOM, for example:


./zdoom -iwad /path-to-doom-wad/doom.wad

And hopefully you’ll be welcomed by the familiar DOOM menu, below:

ZDoom running DOOM

Advertisements
This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s