This is being caused by the sound server thread. I suspect it is because of
the polling sound_sdl_get_event does to see if there is a sound event
waiting.

The authors of the sound servers, Christoph and Pizza, might be able to shed
some light on their choice of the polling method and its pros and cons. Are
there any ideas on any other methods and their good and bad points?

A method I looked into was using DirectMusic (from DirectX). Problem is, it
doesn't really fit in with the sound server plug-in architecture currently
used. The good points are: it's easy, you don't have to interact with
threads yourself (they are used but transparent), it's also easy to add
effects and whatever. None of the current midiout stuff would be used to
output sound; DirectMusic handles it all using the user's current setup.

If DirectMusic was to be implemented, the easiest/best way to do this would
be:
1. Loading all songs on Freesci startup and converting them from MIDI format
to DirectMusic 'segments'.
2. The current sound server would not be used (neither soundserver.c or
soundserver_sdl.c). A single command would be sent to DirectMusic from the
kSound function (I assume) to play a song or do whatever. The code can be
put in soundserver.c (and really should be), but none of what's there
currently would be used.

Feedback please. :-)

Alex.



Reply via email to