Add support to NPPAngband v0.5.0-WIP for sound effects under Linux with this patch. NB: requires SDL_mixer library.
NPPAngband v0.5.0WIP - Sound support via SDL_mixer
==================================================
INSTALLATION
------------
To install this patch:
1) Unzip the ~/NPP050WIP-5-Source.zip archive into some directory
NB: Be sure to use 'unzip -a' to unpack the archive or else the patch
will fail to apply!
2) Save the NPP_SDL_mixer.patch.gz patch
file to the ./NPP050WIP-5-Source directory.
3) Unzip the patch:
gunzip NPP_SDL_mixer.patch.gz
4) Apply the patch (make sure you are in the ./NPP050WIP-5-Source directory):
patch -p1 < ./NPP_SDL_mixer.patch
5) Edit Makefile.std and amend the CFLAGS and LIBS settings to suit your
build requirements. With the patch applied, it will build X11, Xaw, Xpj
and GCU versions and may fail if you don't have the requisite libraries
installed.
6) Build:
make -f Makefile.std
All done. Install the resulting angband executable as you would normally
do.
SETUP
-----
The NPP050WIP-5-Source.zip contains a basic sound.cfg file and relevant
.wav files in ./lib/xtra/sound/
If you desire a wider range of sound effects and events, you can download a
copy of Craig Oliver's "v.3.0.5 SFX bundle" version (be careful not to unpack
it into your NPP directory), then copy the contents of the lib/xtra/sound
directory to the corresponding location in your NPP set-up.
You can find Craig's bundle at:
http://www.chambrook.org/angband/angband-3.0.5-soundfx-bundle.zip
PLAYING
-------
To enable sound effects during the game, you need to supply the -v option when
starting the game:
angband -mx11 -v
angband -mxaw -v
angband -mxpj -v ***(see note below)
angband -mgcu -v
Other run-time options can also be applied as normal.
*** XPJ display module: at the time of writing, there seems to be a bug in the
xpj display module. The startup window appears then immediately closes. This
is not a problem with the sound patch (an unpatched build of NPP050WIP does the
same thing).
WISHLIST / TODO
---------------
- setup multiple playback channels to reduce possibility of sounds "backing
up" (I've not yet had this happen, but it's conceivable);
[Update: recent experimentation seems to show that this is a non-issue. No
matter how many sound events occur, the mixer keeps on happily mixing them
- no lag in sound vs. action has been noted].
- support playing of background music (SDL_mixer supports WAVE, AIFF, RIFF,
OGG, and VOC files);
BUGS
----
When the game starts up, you may get a message like:
** Ignoring unknown sound event 'zap'
this is not a bug per se. It just means that when the game parsed the sound.cfg
file, it found a sound event name which it does not recognise (the default
sound.cfg file has an event called 'zap' - hence the message). It's a good way
to tell if you've been editing the file and made a typo.
Aside from the, there are no bugs that I know of, so if you find anything,
please let me know asap.
Aside from that, enjoy!
Brendon Oliver, 10 June 2006.
<brendon.oliver at gmail dot com>