diff options
author | Sven Hesse | 2007-01-31 16:23:34 +0000 |
---|---|---|
committer | Sven Hesse | 2007-01-31 16:23:34 +0000 |
commit | 8b4001f4908c2653338521d297661fc6faa169ea (patch) | |
tree | 35eced088b6119ad29efad121ec1ce5d35eb884f /engines/gob/sound.cpp | |
parent | 17e70efe13a77d94a78e09591ab84ed78abcdda0 (diff) | |
download | scummvm-rg350-8b4001f4908c2653338521d297661fc6faa169ea.tar.gz scummvm-rg350-8b4001f4908c2653338521d297661fc6faa169ea.tar.bz2 scummvm-rg350-8b4001f4908c2653338521d297661fc6faa169ea.zip |
Replaced the delay in o1_keyFunc with a (skipable) busy-wait detection
svn-id: r25311
Diffstat (limited to 'engines/gob/sound.cpp')
-rw-r--r-- | engines/gob/sound.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp index c29c8ff80d..9ee1cb2f98 100644 --- a/engines/gob/sound.cpp +++ b/engines/gob/sound.cpp @@ -262,18 +262,18 @@ int Snd::readBuffer(int16 *buffer, const int numSamples) { } if (_fade) { - if (++_curFadeSamples < _fadeSamples) { - _fadeVol -= _fadeVolStep; - } else { + if (++_curFadeSamples >= _fadeSamples) { if (_fadeVolStep > 0) { _data = 0; _end = true; _playingSound = 0; + _compositionPos = -1; } else { _fadeVol = 255.0; _fade = false; } - } + } else + _fadeVol -= _fadeVolStep; } } return numSamples; |