aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2004-11-24 10:00:02 +0000
committerMax Horn2004-11-24 10:00:02 +0000
commit147a09bcf5d4182fd8fbff9ce53cfeaa13f4af60 (patch)
tree6cb815eb5de79a3c0a13f57e6d60ef6991fc7832 /scumm
parent666d7d106d35ebae690ca99d34fc42b851125d14 (diff)
downloadscummvm-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.cpp8
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;