* fixed a key group bug which caused undefined behavior in conjunction with
stolen voices (this case was usually followed by a "killed voice
survived" or "voice stealing didn't work out" error message)

* support for the gig parameters for "release velocity response"
curves, which means the decay and release times now depends on
velocity. The softer velocity, the longer release.
* fine tuning of the envelope curves. Decay1 and release now have two
parts, first linear and then exponential at the end.

* All compile time options are now centrally alterable as arguments to the
./configure script. All options are C Macros beginning with CONFIG_
prefix and will be placed into auto generated config.h file.

* Implemented MIDI program change as general, engine independant solution.
The program number will determine the sampler channel to which the MIDI
device will be connected to and the given MIDI channel defines on which
MIDI channel that sampler channel should listen to. Also the program
change will disconnect probably established connection from the previous
program change event.

* [bug #9] Fixed for a LSCP command syntax convention
consistency, regarding the enumeration of available
sampler engines, Audio and MIDI drivers; this has
affected the semantics of the following commands:
GET AVAILABLE_ENGINES
GET AVAILABLE_AUDIO_DRIVERS
GET AVAILABLE_MIDI_DRIVERS
which are now returning an integer count of engines
and drivers, respectively, while the following
new commands are now being introduced:
LIST AVAILABLE_ENGINES
LIST AVAILABLE_AUDIO_DRIVERS
LIST AVAILABLE_MIDI_DRIVERS
taking on the previous functionality, returning
a comma separated list of names.
* LinuxSampler version bumped to 0.3.1.

* removed statically included libgig sources from the LinuxSampler code
base - you now have to compile and install libgig separately
* added -Wreturn-type gcc switch to avoid bugs with no returns on non void
functions in future

* fixed some segfaults (which occured on EngineChannel destruction)
* InstrumentResourceManager: recache small samples if their current
number of silence sample points are not sufficient enough for the used
audio output device
* src/linuxsampler.cpp: voice / streams statistics on the console is back
again (can be turned on with command line switch --statistics)

* design change: using now one sampler engine instance and one disk thread
instance for all sampler channels that are connected to the same audio
output device (and are using the same engine type of course)
* added EngineFactory / EngineChannelFactory to remove the annoying build
dependencies e.g. of the lscpserver to the actual sampler engine
implementations
* bumped version to 0.3.0 (current CVS state is still quite broken,
previous, stable CVS version was tagged as "v0_2_0" and is also available
as source tarball)

* lscpserver: we now only use one instrument loader thread; commands for
loading instruments in the background wait in a queue to be processed one
by one to avoid possible race conditions and to improve I/O efficiency
* fixed possible race condition while streaming with multiple disk threads
by using an own decompression buffer for each disk thread
* libgig: fixed some memory leaks caused by non virtual base constructors

* some fixes regarding the filter (fixes the "silence" bug which occured
occasionally, caused by random biquad parameters which lead to unstable
filter equation and thus to infinit filter output results)

* introduced 'synthesis mode' to reduce the amount of code and conditionals
for the current synthesis case in the main synthesis loop
* support for MMX and SSE(1) in the core synthesis algorithms (CPU feature
detection at runtime, only x86 so far)

* introduced 'synthesis mode' to reduce the amount of code and conditionals
for the current synthesis case in the main synthesis loop
* support for MMX and SSE(1) in the core synthesis algorithms (CPU feature
detection at runtime, only x86 so far)

* gig::Engine: changed way how events make it from the input event queue
into the engine's process chain (fixes forced segfault in EGADSR)
* Event.h: using signed type for fragment position for easier
differentiation if event might happened before or after current fragment

* fixed segfault which occured whenever a voice stole a voice and was in
turn killed in the same audio fragment, to fix that the MIDI key
informations are now updated only after all voices were processed

* libgig: fixed panorama value in DimensionRegion (invalid conversion
from signed 7 bit to signed 8 bit)
* src/linuxsampler.cpp: stacktrace is now automatically shown on fatal
errors (that is segmentation faults, etc.), gdb should be installed for
this to work
* gig::Voice: tiny accuracy fix of pan calculation
* replaced old pool classes by completely new ones which now offer
Iterator abstraction

stacktrace routines by Bjorn Reese, only slightly modified:
- header file adjusted to work with C++ applications
- deactivated separated piping of debugger output, as it didn't work out
correctly in multithreaded application

* added first two experimental voice stealing algorithms ('oldestkey' -
which just steals the oldest voice on the oldest key and 'keymask' - which
tries to pick the oldest voice on the same key where the new voice should
be spawned, if it fails it behaves like 'oldestkey'), the desired algorithm
can be selected at compile time (see Engine.h) will be configurable via
LSCP soon though

* implemented key groups (a.k.a exclusive groups) which is important for
drum patches and monphonic instruments
* src/engines/gig/Engine.cpp: bugfix in ProcessNoteOn() - did not always
stick the note on event to the respective key's own event list although
e.g. the EGADRS expects it to find there

* ALSA audio driver: bugfix in device parameter 'CARD' which caused an
error message if used in conjunction with 'CREATE AUDIO_OUTPUT_DEVICE'
LSCP command
* JACK audio driver: fixed minor JACK port name issue and the device was
not activated by default on creation which caused it to render solely
silence
* src/network/lscpserver.cpp: retry to bind socket for 3 minutes if bind
failed

* completely removed the lex scanner and replaced it by pure yacc rules
for all terminal symbols (that is command keywords and variables) to
avoid misunderstandings while parsing (e.g. recognition of command
keywords in string arguments)
* src/drivers/audio/AudioChannel.cpp: changed channel parameter 'Name' to
'NAME' as defined in the LSCP documentation

* src/drivers/DeviceParameter.cpp: fixed return values for
classes 'DeviceRuntimeParameterString' and 'DeviceCreationParameterString'
which returned their values without being encapsulated into apostrophes,
fixed return values for 'DeviceRuntimeParameterBool' and
'DeviceCreationParameterBool' to be returned in lower case (as defined in
the LSCP documentation)
* src/network/lscp.y: key value pairs now also allow strings (without
spaces) to be not encapsulated into apostrophes (e.g. foo=bar instead of
foo='bar')
* src/linuxsampler.cpp: show on the console which TCP port the LSCP server
is using

* src/linuxsampler.cpp: tidied up a bit, "initialization completed"
message shown only after the server is actually running
* src/testcases/: print the name of each test suite before running the
tests of the suite, added first tests against the LSCP server using a
socket connection to the LSCP server (tests for the following LSCP
commands: "ADD CHANNEL", "GET CHANNELS", "REMOVE CHANNEL")

* SET CHANNEL AUDIO_OUTPUT_TYPE <chan> <driver> command is back!
creates an audio output device instance of the given driver type
('Jack' or 'Alsa') with default parameters if none exists,
otherwise it just picks the first available device and assign
it to the intended sampler channel.
* The AudioOutputDevice class get's a new pure virtual method,
Driver(), which is implemented on both of the existing inherited
classes, AudioOutputDeviceAlsa and AudioOutputDeviceJack, with
the sole purpose to return the driver type name as a String
('Alsa' and 'Jack', respectively).
* The quoting on the filename argument for the LOAD INSTRUMENT
command has been made optional; you can have both ways, with
single quotes or none, keeping compability with older LSCP
specification.
* An additional sanity check is made on LOAD INSTRUMENT, whether
the sampler channel has an audio output device assigned, thus
preventing the server from crashing on instrument file load.
* The GET AUDIO_OUTPUT_DEVICE INFO now includes the missing
'driver' item, as predicted by the draft protocol document.

* Load Instrument patch applied; this patch makes the
LOAD INSTRUMENT command to return immediately,
almost/always with an OK response, while spawning
the proper instrument file loading in the background.
* New INSTRUMENT_STATUS field on GET CHANNEL INFO result
set; the instrument status value holds the load progress
percentage if positive, otherwise a negative value is
evidence of a load exception error.
* VERSION is now set to 0.2.

* src/common: added template class 'optional<>' which can be used e.g. as
return type whenever a value might be returned, but don't has to; this
template class pretty much acts like a pointer of the given type, but is
much more safer than a simple pointer
* src/audiodriver: added static class AudioDeviceFactory to create audio
devices at runtime by using a string and to obtain driver informations
of drivers at runtime, driver classes should simply use the macro
REGISTER_AUDIO_OUTPUT_DRIVER(DriverName,DriverClass) in their cpp file
to register the driver to LinuxSampler (no changes needed anymore in the
LS code to add a new audio output driver)
* src/drivers: added classes to dynamically manage driver parameters; there
are two different kinds of parameters: parameters which are need to
create a new device (DeviceCreationParameterX) used to e.g. create an
audio output device or a MIDI input device and parameters which are only
available at runtime, means when a device is already created
(DeviceRuntimeParameterX) which will be e.g. used as audio channel
parameters and MIDI port parameters
* src/linuxsampler.cpp: all registered audio output drivers will be shown
on the console on startup
* src/network: implemented configuration of audio output devices via LSCP

* src/common/Thread.cpp: threads are now stoppable even if they are
waiting for a condition
* src/common/Condition.cpp: fixed little misbehavior of Set() method,
which locked the Condition object on return
* src/testcases: added a couple of new unit tests (against classes
'Mutex', 'Condition' and 'Thread')

* src/common/Thread.cpp: method StartThread() now blocks until thread
actually runs, mlockall() will only be applied for realtime threads
* libtoolized liblinuxsampler
* initiated automatic unit tests against the LinuxSampler codebase
(see src/testcases): already added a couple of tests for the Thread and
Mutex classes, you have to explicitly compile the unit tests by running
'make testcases' (you need to have cppunit installed though) and then you
can run the console version of the test runner by calling
'src/testcases/linuxsamplertest'
* src/Sampler.h: added API documentation

* added Envelope Generator 2 and 3 (filter cutoff EG and pitch EG) for
accurate .gig playback
* fixed accuracy of pitch calculation
* changed filter cutoff range to 100Hz..10kHz with exponential curve, this
value range can also be adjusted on compile time by setting
FILTER_CUTOFF_MIN and FILTER_CUTOFF_MAX in src/voice.h to desired
frequencies
* src/lfo.h: lfo is now generalized to a C++ template, which will be useful
especially when we implement further engines

* added filters (lowpass, bandpass and highpass), note that filter code is
currently disabled by default, you have to explicitly enable it in
src/voice.h by setting define ENABLE_FILTER to 1
* src/eg_vca.cpp: Decay_1 stage now using exponential curve

* src/eg_vca.cpp: added following transitions to the envelope generator:
'Attack_Hold' -> 'Release', 'Decay_1' -> 'Release' in case of a release
event
* EG1 parameters 'Attack Time', 'Release Time' and 'Sustain Time' are now
controllable by a MIDI controller defined in the .gig file
* src/voice.cpp: fixed bug in pitch calculation which caused new triggered
voices to be played back without honoring the current pitch bend value

* implemented parser for the LinuxSampler control protocol (LSCP) by using
flex / bison (where src/network/lscp.l is the input file for lex / flex
and src/network/lscp.y is the input file for yacc / bison), parser and
scanner can be regenerated by 'make parser'
* implemented LSCP network server (only single threaded so far), LSCP
server will be launched if LinuxSampler was started with "--server" flag,
implemented the following LSCP commands so far: "LOAD INSTRUMENT", "GET
CHANNEL VOICE_COUNT", "GET CHANNEL STREAM_COUNT", "GET CHANNEL
BUFFER_FILL", "SET CHANNEL VOLUME" and "RESET CHANNEL"
* disk thread now started within the engine

* implemented bidirectional voice state transition, means voice state can
switch arbitrary times between 'Sustained'<-->'Released' within it's life
time, thus the release process of a voice can be cancelled
* src/eg_vca.cpp: extended envelope generator by additional states
('Attack_Hold', 'Decay_1' and 'Decay_2')
* applied patch from Vladimir Senkov which adds new command line parameters
('--jackout', '--alsaout' and '--samplerate')
* configure.in: fixed compiler warning

* Added JACK support: Audio rendering process is now callback based and
independant of used audio output system. Interfaces to other audio output
systems can be added by creating a class derived from abstract base class
'AudioIO' and embedding the new class into linuxsampler.cpp.
* src/audiothread.cpp: applied patch from Vladimir Senkov which fixes
hanging notes in conjunction with the sustain pedal

* implemented looping; RAM only loops (that is loops that end within the
cached part of the sample) are handled in src/voice.cpp whereas
disk stream looping is handled in src/stream.cpp and is mostly covered
there by the new ReadAndLoop() method in class 'Sample' from src/gig.cpp

gig.cpp, gig.h: added method GetInstrument(uint index) to class 'File'
which is needed for the new command line switch --instrument in
linuxsampler.cpp (forgot this to commit with the recent commit batch)

* added command line switch --volume to set the global volume level
* added command line switch --inputclient to connect to an Alsa sequencer
input client on startup (e.g. a MIDI port with a keyboard)
* added command line switch --instrument to select an instrument in case
the instrument file provides more than one instrument

* implemented velocity->volume mapping: samples are now played back with a
volume appropriate to the velocity of the triggered key, the velocity
curve transformation functions (in src/gig.h) used for this are so far
only an approximation to the ones from Gigasampler

* rewrote sustain pedal handling: instead of just queuing the note-offs I
added a sustain pointer for each midi key which starts to point to the
first active voice on the respective key and increments to the next voice
on the key when a note-off arrived, the release velocity value will
immediately be stored in the respective voice object (this also fixes the
segmentation fault issue when the sustain pool was full)

* src/voice.cpp: fixed bug which caused a voice not free it's disk stream
when the whole sample was already played back and the voice was going to
free itself resulting in outage of unused disk streams after a while
* src/audioio.cpp: implemented automatic fallback to ALSA plughw when the
sound card doesn't support one of the hardware parameters
* src/linuxsampler.cpp: solved segmentation fault issue when receiving a
SIGINT which was caused due to the fact that all threads entered the
signal handler (there still seems to occur a segfault on some certain
circumstances though)
* added print out of all-time maximum usage of voices and streams and the
current number of unused streams
* src/thread.cpp: the StopThread() method will now block until the
associated thread actually stopped it's execution

* src/gig.cpp: fixed bug in decompression algorithm which caused it not to
detect the end of a stream and let the disk streams reload forever also
resulting in strange sounds at the end of disk voices (concerned only
playback of compressed gig files)
* src/audiothread.cpp: deallocation of voices when they reached the end of
playback (thus e.g. when sustain pedal is pressed and a disk stream
reached it's end)
* various endian corrections needed for non intel systems
* introduced debug level, you can set the debug level and thus the
verbosity of LinuxSampler in src/global.h