From 35922c28c8579c9f2fe476a351da74a92b7660d5 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 9 Dec 2014 00:35:02 +0100 Subject: [PATCH] ACCESS: Add a hack to fake queueing --- engines/access/amazon/amazon_logic.cpp | 2 +- engines/access/sound.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/access/amazon/amazon_logic.cpp b/engines/access/amazon/amazon_logic.cpp index 89ea81507b2..f1bf7dcf3bd 100644 --- a/engines/access/amazon/amazon_logic.cpp +++ b/engines/access/amazon/amazon_logic.cpp @@ -354,9 +354,9 @@ void Opening::doTitle() { _vm->_buffer2.plotImage(_vm->_objectsTable[0], id, Common::Point(xp, 71)); _vm->_screen->copyFrom(_vm->_buffer2); + _vm->_sound->playSound(1); _vm->_events->_vbCount = 70; while (!_vm->shouldQuit() && _vm->_events->_vbCount > 0 && !_skipStart) { - _vm->_sound->playSound(1); _vm->_events->pollEventsAndWait(); if (_vm->_events->_rightButton) _skipStart = true; diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp index b5800ba82f5..4e701618d9b 100644 --- a/engines/access/sound.cpp +++ b/engines/access/sound.cpp @@ -82,6 +82,10 @@ void SoundManager::playSound(Resource *res, int priority) { assert(res->_size >= 32); + // HACK: Simulates queueing for the rare sounds played one after the other + while (_mixer->hasActiveChannelOfType(Audio::Mixer::kSFXSoundType)) + ; + if (READ_BE_UINT32(resourceData) == MKTAG('R','I','F','F')) { // CD version uses WAVE-files Common::SeekableReadStream *waveStream = new Common::MemoryReadStream(resourceData, res->_size, DisposeAfterUse::NO);