diff options
author | Johannes Schickel | 2008-05-17 15:12:20 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-05-17 15:12:20 +0000 |
commit | 8f0703abd2c42e20caf14fa5c5553aa2232aff57 (patch) | |
tree | 393e2abe0a8045c796cf7224e3827c85d04ed9e1 | |
parent | 84610606c127acf70d3faf166c4919d9eecbb625 (diff) | |
download | scummvm-rg350-8f0703abd2c42e20caf14fa5c5553aa2232aff57.tar.gz scummvm-rg350-8f0703abd2c42e20caf14fa5c5553aa2232aff57.tar.bz2 scummvm-rg350-8f0703abd2c42e20caf14fa5c5553aa2232aff57.zip |
- Fixed sound channel fadeout on VQA playing
- Minor formatting fixes
svn-id: r32152
-rw-r--r-- | engines/kyra/kyra_mr.cpp | 5 | ||||
-rw-r--r-- | engines/kyra/vqa.cpp | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 07083913da..6e4d266480 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -370,7 +370,10 @@ void KyraEngine_MR::playVQA(const char *name) { snprintf(filename, sizeof(filename), "%s%d.VQA", name, size); if (vqa.open(filename)) { - _soundDigital->stopAllSounds(); + for (int i = 0; i < 4; ++i) { + if (i != _musicSoundChannel) + _soundDigital->stopSound(i); + } _screen->hideMouse(); memcpy(_screen->getPalette(1), _screen->getPalette(0), 768); diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index cea52e911e..3d18f27c7e 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -362,9 +362,8 @@ void VQAMovie::close() { delete[] _partialCodeBook; delete[] _vectorPointers; - if (_vm->_mixer->isSoundHandleActive(_sound)) { + if (_vm->_mixer->isSoundHandleActive(_sound)) _vm->_mixer->stopHandle(_sound); - } _frameInfo = NULL; _frame = NULL; @@ -655,11 +654,10 @@ void VQAMovie::play() { while (1) { uint32 elapsedTime; - if (_vm->_mixer->isSoundHandleActive(_sound)) { + if (_vm->_mixer->isSoundHandleActive(_sound)) elapsedTime = _vm->_mixer->getSoundElapsedTime(_sound); - } else { + else elapsedTime = _system->getMillis() - startTick; - } if (elapsedTime >= (i * 1000) / _header.frameRate) break; |