01/29/03:
started to build a soundengine with SDL, based on SDL tutorials, failed.

01/30/03:
continue...

02/01/03:
first time i heard a sound from linux MiniRacer.

02/02/03:
first little buggy sound engine, no looped sounds yet.
converted menu music sounds to 11025Hz, mono using sox.
sound conversion on the fly in the play function is a little bit complex,
so we can avoid it temporarily.

example cmdline for sox: sox menu1.wav -r 11025 -c 1 -u -b  menu11.wav  

02/28/03:
rewrote sound engine, using SDL_mixer. it was very easy and successful. thanks
to roger for his great sdl mixer tutorial!!! now it should be easy to crerate a
a useable sound engine!!!

wrote the first version of a sound engine based on SDL_mixer.
the engine is functional (missing setvolume and setpitch), but it causes very
high cpu load...

03/01/03:
found the reason for the high cpu load and fixed it: Mix_OpenAudio() is called
with wrong parameters (audio_rate=22050, audio_channels=2), so Mix_LoadWAV() has
to convert audio files to correct format (audio_rate=11025, audio_channels=1),
now opening the device with the correct parameters, no more high cpu load

03/03/02:
implemented setvolume, tried to find a resampling routine for the pitch, worked
on it nearly all day, no solution, pitch sux:-(

03/04/03:
futher tries on the resampling, no solution

03/05/03:
gave up resampling, now trying fft

03/06/03:
played with fft and resampling, found at last a very simple resampling routine
which does the pitch!

03/10/03:
bug: sound engine (and MiniRacer) crashed when no audio device were available,
fixed (using new variable sound_avail).

03/29/03:
using new structure soundbuf_t to hold channel number and mix chunk.

03/30/03:
engine pitch function rewritten, using fxShift() from GLtron and
Mix_SetPostMix(). It does not work like expected (engine sound is now the only
sound in game), but it is on the right way, i think.

03/31/03:
pitched engine sound works! with SD_MixAudio() in the Mix_SetPostMix() callback
function it is possible to affect only the engine sound and not the complete
stream. engine sound still sounds a little bit strange...

04/03/03:
routine for filling srcptr rewritten, no more nasty cracks in the stream,
srcptr will now be filled continuously.

04/07/03:
pitch function rewritten: in the old version we used a temporary variable
pitchptr to store the pitched engine sound and mixed it into the stream using
SDL_MixAudio(). Now fxShift() works directly on the stream, because fxShift()
behaves like a mix function and can be used to mix the pitched engine sound
without the need of SDL_MixAudio().
success!!! engine sound now working! thanks to Andreas Umbach for GLtron!
furthermore fixed the problem that multithreading did not work when compiling
soundfx.c into separate object: we have to use a common header, the it works.
sound engine is now fully functional (pan function not implemented yet, because
not used in the original MiniRacer source code).
SDL_mixer converts audio files automatically when loading so that we can use
the original menu sounds again.

05/29/03:
renamed "sdl_sound.h" in "soundfx.h" and changed some definitions to avoid
conflicts with the existing "sound.h".

06/01/03:
added a correcture factor, so now directx and sdl sound engine pitch are equal.
sound engine is now complete.

21/09/03:
added pak file support, so Mix_LoadWAV() can't be used any longer, now using
Mix_QuickLoad_WAV() instead. problem: Mix_QuickLoad_WAV() doesn't convert files
at loading like MixLoadWAV() does. found (temporary) solution: converted all
sound files to 11025Hz stereo using sox:

sox f40.wav -r 11025 -c 2 -s -w f401.wav

now it sounds good again.
fixed a bug: freeing of the chunk in MR_SampleFree() must be done with
Mix_FreeChunk() not, with SDL_FreeWAV(), but this also doesn't work,
commented it out to avoid improper shutdown

12/15/04:
began working on a routine for smooth pitching
files:
    sound_sdl.c

12/31/04:
smooth pitch doesn't work like expected: the function uses delays between pitch
steps so it slows down the game...
files:
    sound_sdl.c

01/02/05:
a future solution may be multithreading but for now we have another solution:
coerce maximal step width of the pitch frequency
files:
    sound_sdl.c

03/11/05:
played around with new sound files and decided to change the default sound mode
to 22kHz, stereo. this sounds much better...
files:
    sound_sdl.c
