Wild speculation mode on; please bear with me.
Some time ago there was a ScummVM
bug report about choppy audio in the Linux version when playing Broken Sword 2
, albeit only when the player moves in such a way that the "camera" has to move to follow him. Ordinarily, BS2 outputs 12 frames per second. Most of the rest of the time it "sleeps", that is to say it calls SDL_Delay()
. The result is that most of the time, CPU usage stays fairly low. When the camera moves, on the other hand, it would output frames as fast as it could to make the screen scroll more smoothly. At these times ScummVM would use up pretty much all available CPU time.
What I eventually did was to add a brief delay (~ 10 ms, since that's the granularity the SDL
documentation says is the most common) between the frames even in this case. The bug reporter said this caused the choppiness to go away, and since the scrolling still looked smooth to me I left it that way. My guess is that while the main thread was hogging the CPU, the OS scheduler didn't give enough time to the audio thread, causing it to run out of audio samples to play. But that's just speculation. I was never able to reproduce the bug myself, neither under Linux nor Windows, however.
Just like with ScummVM, I don't hear any choppiness in the audio with the Linux ITE demo. I haven't yet had the time to try the full version since it only arrived yesterday and I was dead tired, but I assume it's the same in that respect. I did notice that it does appear to use all available CPU at all times, so it could be the same problem, I guess.