Hi,

Well first the good news. Thanks to those people that helped, I
finished the prototype of the event sound server and it appears to work (at
least it plays the first song in LSL3 before it stops working).

And now the bad news which is, surprise surprise, the limitations of
Windows. After finding the sound server playing slowly, I looked around the
Internet, and it appears that everyone agrees that Windows timing is up the
creek. For example, on Win NT, the high res sleeps that we use actually can
only sleep for a minimum of 10 milliseconds, even if you only use a
parameter of 1. On Win9x, the minimum goes up to about 45 ms.

It follows that if you ask Windows to sleep for 17ms as is required in the
sound server (60 ticks per second = 16.6667 ms), it tends to sleep for a
noticeably longer time than that. Hence a song plays at almost half speed.
As you can work out, on Win9x we would get more like 20 ticks per second,
not 60!

So this is a really serious problem! Ideas I've had are:
- get around the need for 60 ticks/second (can't think of how and don't like
the sound of it)
- free cross-platform real-time solution such as (may improve the situation,
I'm unsure as to whether it can solve it - found one called RTSN???)
- look for other Win32 sound servers on the net and see what they do (see
http://www.grame.fr/MidiShare/ - very interesting)
- scrap our sound servers on Win32 altogether and use DirectMusic from
DirectX.

As an aside, Microsoft did develop a version of NT a couple of years ago for
'research' that supported real time functions. From their report it sounds
like it worked well, as you would expect since they added the functions
straight into the kernel. Pity they seem to have shelved it.

Alex.




Reply via email to