From 15675e5652f9204beb60b51a1696c907c4c046c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Tue, 8 Oct 2002 14:32:19 +0000 Subject: [PATCH] added delay before start playing sample to get chance for doComand svn-id: r5109 --- scumm/imuse.cpp | 6 ++++++ scumm/imuse.h | 1 + 2 files changed, 7 insertions(+) diff --git a/scumm/imuse.cpp b/scumm/imuse.cpp index c90fa4c6c6c..9b5da8800c5 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 fea1ecc6117..80063199abc 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;