aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorPaweł Kołodziejski2002-10-08 14:32:19 +0000
committerPaweł Kołodziejski2002-10-08 14:32:19 +0000
commit15675e5652f9204beb60b51a1696c907c4c046c8 (patch)
tree53a123a741dba445c280d8a021f9e7bdbf602a64 /scumm
parentc10698a614eea91c9966fcb9d7dd716d1c3b67ec (diff)
downloadscummvm-rg350-15675e5652f9204beb60b51a1696c907c4c046c8.tar.gz
scummvm-rg350-15675e5652f9204beb60b51a1696c907c4c046c8.tar.bz2
scummvm-rg350-15675e5652f9204beb60b51a1696c907c4c046c8.zip
added delay before start playing sample to get chance for doComand
svn-id: r5109
Diffstat (limited to 'scumm')
-rw-r--r--scumm/imuse.cpp6
-rw-r--r--scumm/imuse.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp
index c90fa4c6c6..9b5da8800c 100644
--- a/scumm/imuse.cpp
+++ b/scumm/imuse.cpp
@@ -4866,6 +4866,11 @@ void IMuseDigital::handler() {
continue;
}
+ if (_channel[l]._delay > 0) {
+ _channel[l]._delay--;
+ continue;
+ }
+
if (_channel[l]._volumeFade != -1) {
if (_channel[l]._volumeFadeStep < 0) {
if (_channel[l]._volume > _channel[l]._volumeFade) {
@@ -4991,6 +4996,7 @@ void IMuseDigital::startSound(int sound) {
_channel[l]._volume = 127;
_channel[l]._volumeFade = -1;
_channel[l]._volumeFadeParam = 0;
+ _channel[l]._delay = 1;
uint32 tag, size = 0, r, t;
diff --git a/scumm/imuse.h b/scumm/imuse.h
index fea1ecc611..80063199ab 100644
--- a/scumm/imuse.h
+++ b/scumm/imuse.h
@@ -85,6 +85,7 @@ private:
int8 _volumeFade;
int8 _volumeFadeParam;
int8 _volumeFadeStep;
+ uint32 _delay;
bool _isJump;
uint32 _numLoops;
uint32 _offsetStop;