Configuring Gore sound.
-------------------------------------------------------------------------------

Gore contains several entries in the settings/client_system.cfg file that 
control how the sound mixer works. Note: settings in client_system.cfg are 
only update when the game is started so its best to shutdown Gore, modify 
the file and then restart Gore.

The Gore mixer can utilize either DirectSound or the win-wave interface.  Under 
default operation, Gore attempts to use DirectSound first and if that fails
then Gore will use the win-wave interface.

The Gore mixer can perform mixing using two different methods.  The first
(and default) method is to use a timed background thread.  The second method
is to periodically update the mixer between frames.  In general, a timed 
background thread is preferable because it is more regular and the mixing
buffers can be made smaller.  The per-frame method requires that the mixing
buffer be as long as the longest frame time expected.  If its not long enough
then the sound may skip during low frame-rate periods.  Gore can be configured
to use either or both methods.  It is important to note that the longer the 
mix-ahead buffer is the longer the delay will be from when a sound is played
to when it is actually heard.

The sound settings are as follows:

mixnodsound [0/1] - This options controls whether or not Gore attempts to 
                    use DirectSound.

mixbgnd [0/1] - This controls whether or not Gore uses a timed background 
                thread to perform mixing.

mixpoll [0/1] - This controls whether or not Gore performs per-frame mixer
                updates.

mixdsbuflen [10-300] - This settings controls the DirectSound mix-ahead 
                       buffer length in milliseconds.

mixwwbuflen [10-300] - This settings controls the win-wave mix-ahead 
                       buffer length in milliseconds.


Default configuration (as of version 1.31):

mixnodsound 0
mixbgnd 1
mixpoll 0
mixdsbuflen 50
mixwwbuflen 200

Configuring the mixer to work like GoreTest 1:

mixnodsound 1
mixbgnd 1
mixpoll 1
mixdsbuflen 50
mixwwbuflen 200


If you experience sound problems:

1) Try disabling DirectSound using mixnodsound 1 first.  If this corrects your 
problem then the DirectSound code is at fault.  If not, or the problem changes
then both methods are not working properly (or you do not have DirectSound).

2) If you suspect that the DirectSound code is not working correctly try the
following things:

* Increase the mix-ahead buffer length using mixdsbuflen.  Try small increments 
of 25 or 50.  If you experience a skipping sound you might notice that it gets 
better as you go. If so keep increasing the buffer length until the sound is 
smooth.

3) If you suspect that the win-wave code is not working correctly try the
following things:

* Increase the mix-ahead buffer length using mixwwbuflen.  Try small increments 
of 25 or 50.  If you experience a skipping sound you might notice that it gets 
better as you go. If so keep increasing the buffer length until the sound is 
smooth.

4) You can also try various combinations of mixbgnd and mixpoll. There are 4
combinations, 3 of which are legal:

Both off (THIS IS ILLEGAL - DO NOT DO THIS):
mixbgnd 0
mixpoll 0

Background mixing only:
mixbgnd 1
mixpoll 0

Per-frame mixing only:
mixbgnd 0
mixpoll 1
NOTE: if you use per frame mixing only your mix-ahead buffer length will have 
to be fairly large to avoid skipping during low-framerate perfiods.  Try 100+

Both methods:
mixbgnd 1
mixpoll 1
NOTE: This method is the most CPU costly but will increase the number of 
mixer updates and give you minimum chance of skipping and may allow you 
to bring you mix-ahead buffer length down.

5) If you get it working (or not), please mail a description of your results
to gorebugs@4drulers.com.



