diff options
author | Max Horn | 2004-11-24 10:00:02 +0000 |
---|---|---|
committer | Max Horn | 2004-11-24 10:00:02 +0000 |
commit | 147a09bcf5d4182fd8fbff9ce53cfeaa13f4af60 (patch) | |
tree | 6cb815eb5de79a3c0a13f57e6d60ef6991fc7832 /scumm | |
parent | 666d7d106d35ebae690ca99d34fc42b851125d14 (diff) | |
download | scummvm-rg350-147a09bcf5d4182fd8fbff9ce53cfeaa13f4af60.tar.gz scummvm-rg350-147a09bcf5d4182fd8fbff9ce53cfeaa13f4af60.tar.bz2 scummvm-rg350-147a09bcf5d4182fd8fbff9ce53cfeaa13f4af60.zip |
(Partial) fix for bug #1035690 (COMI: cannon shooting uses a lot of performance) -- remember, busy waiting is almost always bad, esp. when waiting for another thread...
svn-id: r15875
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/imuse_digi/dimuse_track.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/scumm/imuse_digi/dimuse_track.cpp b/scumm/imuse_digi/dimuse_track.cpp index 2a20a166e9..3dfa13372a 100644 --- a/scumm/imuse_digi/dimuse_track.cpp +++ b/scumm/imuse_digi/dimuse_track.cpp @@ -77,10 +77,12 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType, Track *track = _track[l]; while (track->used) { -#if defined(_WIN32_WCE) || defined (__PALM_OS__) - _vm->parseEvents(); // timers are events, we need to consume them -#endif + // The designated track is not yet available. So, we call flushTracks() + // to get it processed (and thus made ready for us). Since the actual + // processing is done by another thread, we also call parseEvents to + // give it some time (and to avoid busy waiting/looping). flushTracks(); + _vm->parseEvents(); } track->pan = 64; |