Joerg-Cyril.Hoehle@t-systems.com writes:
What happened every so often, even on a single-core machine(!), is that CreateTimerQueue(dueTime=0=immediate) would see the timer thread created and the callback invoked before the function returns. Since This->started was not set yet, our callback would return immediately, in effect causing sound to start only one 10ms period later. That's obviously was not intended by the author. So let's set This->started before CTQ.
This doesn't make sense, there's a critical section.