                         README for sfxserver
                            version 0.02
                           by Terry Evans


Copyright:
----------

  sfxserver

  Copyright by Terry Evans 1994
  tevans@cs.utah.edu, tevans@slc.unisys.com

  Redistribution and use in source and binary forms, with or without
  modification, are permitted provided that the following conditions are
  met: 1. Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer. 2.
  Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.
  
  THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  SUCH DAMAGE.

  
Introduction:
-------------

  sfxserver is a program designed to play sound effects under Linux.
In order for sfxserver to run on your system you must have the sound
drivers compiled into your kernel and configured correctly for your
sound card.


Program Use:
------------

  sfxserver accepts all input via stdin.  In other words, you can either
run the program manually or fork() off a child process that executes sfxserver and writes commands to sfxservers' stdin and reads from its stdout. (See
the sfxclient program that is available at the same sites as sfxserver
for an example.)

  sfxserver currently has 6 commands available.  They are:

  c -
    c clears all internal buffers.

  l<filename> -
    l reads in the raw sound file located at filename.  The filename is
    relative to the path where the program was started.

    l returns sNN.  Where NN is the 2-digit hex sample number that was
    assigned to <filename> internally.  NN is used with the p command.

  pNNLLRR -
    p plays the sample number NN with the left volume set at LL of ff and the
    right volume set at RR of ff.  NN can be any number of a currently loaded
    sample.

    Since the left and right volumes are set by LL and RR respectively,
    to play a sound at full volume, use ff.  To play a sound with no volume,
    use 00, full volume is 80.

    p returns cNN.  Where NN is the 2-digit hex channel on which the sound
    effect is playing.  NN is used with v below.

  vSCCVV
    v Is used to adjust the volume of an already executing sound effect.
    S is the side of the volume to adjust.  The only acceptble values are
    'l' and 'r' (without the quotes).  
    CC is the 2-digit hex channel number to adjust the volume on.  The channel
    number is return by p above.
    VV is the 2-digit hex amount to set the volume at while playing.
    maximum.

    v returns vNN. Where NN is the 2-digit hex number corresponding to the
    volume that the S side of CC was set to.

  q -
    q quits the program.  It doesn't finish playing any pending sounds.


Limitations:
------------

  The server currently only handles 11Khz mono samples in .snd format.

  Only 8 sound channels are available in this release.  Therefore, you
can have 8 different sounds playing simultaneously.

  You are limited to 100 different sound effects loaded into sfxserver
at a time.

  Note:  The number of sound channels and sound effects can easily be
changed in the global.h file.  However, doing so will consume more of your
cpu time.


Other:
------

  The sound effects that are located in this tar file are not mine.  They
are from the soundIt toolkit by Brad ?? (pitzel@cs.sfu.ca).  They are 
included without his permission in this tar file and are not covered by
my Copyright notice. 


Terry Evans
tevans@cs.utah.edu
