Thanks for the feedback.
Warning : long semi-technical paragraphs that aren't important to read - you can just skip to the end line if you like!
It's interesting that the feedback from the Vista sound programmers, when the old sound lag issue was described to them, was that they won't fix it. And they basically blamed the sound issue on me by saying that writing to an already submitted sound buffer was a bad thing to do (though they didn't mention that it worked fine in all previous versions of Windows). Anyway on studying the documentation, I decided to take their word for it and reprogram that lower level part of the sound system. Well now in U22 LFS never writes to a submitted sound buffer, it only writes to buffers THEN submits them when Windows reports that it is finished with one of the buffers it has. This method is supported by the documentation. I'm really doing it BY THE BOOK now - and still there is lag in Vista. Or at least, LFS needs to send 3 or 4 sound blocks ahead, to overcome that delay issue which still looks like a Windows bug to me. And these blocks sent ahead, add up to lag.
As I see it now, there seems to be a delay in the delivery of sound buffer data, to the sound card itself, somehow, within Vista. It doesn't matter if I program it the old "wrong" way or the new "right" way - in both cases, there is a delay in delivering the sound data to the sound card. It seems like quite a problem to me and just a bit unfortunate / annoying because this is something I just have to deal with, because the MS sound developers decided to make it work a different way. I'm not sure what to do, perhaps I should try using DirectSound instead of waveOut. I wouldn't be surprised if the same problem appeared again even then! But maybe they have streamlined DirectSound and neglected waveOut... I guess I won't know until I try.
Anyway, the U22 test is a bit confusing. After reading your reports and investigating the echo crackling at South City with headphones (and finding the echo code quite hard to understand) I removed the echo code completely to see which problems it cured. A lot of crackling did go, as expected but then there was still distortion and a bit of crackling, specially when racing against an AI car around South City. However this distortion, strangely enough, was not so bad when tested on another computer.
The result is that there are more problems with the sound than originally expected (and here we aren't even mentioning the actual quality of the car engine sounds which is a separate issue). It's a slight problem for bug reports, distingushing between the Windows issues and the LFS issues, while LFS is producing crackling and that can sound a bit like the skipping.
I need to make a cleaner version of LFS sound that is capable of producing the expected sounds without bubbles and crackles. And then we need to reassess the situation with Windows.