=head1 NAME

cfsndserv - crossfire client sound server

=head1 DESCRIPTION

B<getzone> adjusts and mixes sounds before playing them

=head1 USAGE

B<getzone> none - started automatically by crossfire client

=head1 CONFIGURATION OPTIONS

~/.crossfire/sndconfig can contain the following options:

=over 2

=item stereo

1 means stereo sound, 0 - mono

=item bits

bitrate of generated sound - 8 or 16

=item signed

if we should sent signed data to the soundcard. 1 means yes.

=item frequency

speed of playing data. This should be 11025, or sound pitch will
change

=item buffers

how many buffers to allocate

=item buflen

how big the buffers should be. buffers*buflen shouldn't be smaller
than the longest sound to be played.

=item simultaneously

home many sound can be played at the same time. When this setting is
bigger, each sound volume will decrease.

=back

=head1 HOW DOES IT WORK?

The sound server gets information about sounds to be played on
standard input.

The information is a line:
<sound number> <sound type> <relative x> <relative y>
All those numbers are hex.
The file ~/.crossfire/sounds contains description of sound numbers and
types. For example:

3 0 5 0

Means that normal sound SOUND_FUMBLE spell should be played as it's
source was5 units to the right of player.

Sounds are mixed in special buffers, which are in fact one buffer,
which should be big enough for the biggest sound to be played.

The buffers, if contain anything, are sent one by one to the sound
device. Each buffer is cleaned after playing.

Sounds data is multiplied by some ratio (<1) evaluated from it's
position and volume and added to the buffers, starting from the next
after the one being played.

So bigger buffer means bigger delay, before th sound is actually
played, but the smaller buffer is, the bigger is possibility, we won't
succeed filling the next buffer, before last is played.

=head1 SEE ALSO

L<crossfire(1)|crossfire(1)>

http://crossfire.real-time.com

=head1 AUTHOR

 Jaakko Niemi put this page together for Debian packages by cutting
 and pasting from README file of crossfire-client. 

=cut
