Angband with sound support for Linux

Add support to Angband v3.0.7s for sound effects under Linux with this patch. NB: requires SDL_mixer library.


Angband v3.0.7s3 - Sound support via SDL_mixer
============================================

		*** SPECIAL NOTICE ***

This version of the patch is for application against the Vanilla
'angband-3.0.7.s3' version released by Andrew Sidwell 
(see http://angband.rogueforge.net/). 

		**********************
		
This patch adds support to Angband v3.0.7s for playing sound effects
under Linux (it should probably work under any *nix system where 
you can compile angband, as long as you have a copy of SDL_mixer 
installed, but I've only tested it on Mandriva Linux 2007 and Gentoo,

NB: You will likely need autoconf & automake installed to apply this 
    patch.

INSTALLATION
------------
To install this patch:

1) Extract the angband-3.0.7s3.tar.gz archive into some directory
2) Extract the patch file (angband-3.0.7-sdl_sound_patch.tgz)
   into the same directory.  This should have unpacked the following
   files:
	angband-3.0.7s3/README.SDL (this file!)
	angband-3.0.7s3/sdl_sound_307s.patch
3) Apply the patch:
	cd angband-3.0.7s3
	patch -p1 <sdl_sound_307s.patch
4) Run ./configure as usual.  My usual incantation for configure is:
	./configure --with-setgid=games \
		    --with-libpath=/usr/games/lib/angband \
		    --bindir=/usr/games \
		    --with-x   	
   for system-wide installation in /usr/games.
5) Run make - this should detect the changes in configure.in and
   force the configure script to be rebuild & re-run.

The new configure script has two additional options:
	--disable-sdl_sound
	--enable-sound_debug

Sound support is build by default if configure detects the SDL_mixer
library.  You can turn this off by using the --disable-sdl_sound
option.  Using the --enable-sound_debug option will cause a bunch of
trace messages to be displayed during the game (you shouldn't normally
need this).

SETUP
-----
Sound files are not included in the standard source tarball.  You will 
need to download the extra files for compiling the Windows version:
	ftp://ftp.sunet.se/pub/games/Angband/Windows/ext-win-305.zip
or	ftp://ftp.planetmirror.com/pub/angband/Windows/ext-win-305.zip

Unzip this file and move the contents of the lib/xtra/sound/* directory
to your own lib/xtra/sound directory (you won't need the other files
form this archive). Make sure you get the sound.cfg file as well as the
*.wav files.

PLAYING
-------
When angband is recompiled with this patch, you can use the -v option 
to enable sound effects during the game:

	angband -g -v -mgcu
	angband -g -v -mx11
	angband -g -v -mxaw
	angband -g -v -mxpj

I have not added sound support to the Gtk version (mostly because I never
use it).  You can also combine with the bigtile options, eg:

	angband -g -v -mx11 -- -n 6 -b -g 

By default, all sound files are loaded from disk and cached in memory 
when the game starts up. Be warned, this does slow down the game load time
(especially if you are also using graphics, and more especially in bigtile 
mode). You can turn this behaviour off by using a '-c' option (ie. turn off
sound file caching):

	angband -g -v -mx11 -- -n 6 -b -g -c

Note the position of -c, it must be included as a display-module specific
option.  When you use -c, the sound files are loaded from disk and played
as required.  This may cause some latency between game action and the sound
to be played. If you're using a "reasonable" machine, this shouldn't be much
of an issue.

WISHLIST / TODO
---------------
- support playing of background music (SDL_mixer supports WAVE, AIFF, RIFF, 
  OGG, and VOC files);

BUGS
----
None that I know of, so if you find anything, please let me know asap.  I
originally wrote this patch in mid-2002 and have been using it ever since,
just never got around to releasing it!


Aside from that, enjoy!

Brendon Oliver, 25 April 2007
<brendon.oliver@gmail.com>