From a6bf63bc1a8e79712c9dcf53c04ab3108919ec2c Mon Sep 17 00:00:00 2001 From: athrxx Date: Wed, 17 Jul 2019 20:44:32 +0200 Subject: SCI: revert accidental commits --- engines/kyra/sound/drivers/audiomaster2.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'engines/kyra/sound/drivers/audiomaster2.cpp') diff --git a/engines/kyra/sound/drivers/audiomaster2.cpp b/engines/kyra/sound/drivers/audiomaster2.cpp index a4f7a3e661..261c813b0f 100644 --- a/engines/kyra/sound/drivers/audiomaster2.cpp +++ b/engines/kyra/sound/drivers/audiomaster2.cpp @@ -892,8 +892,6 @@ void AudioMaster2ResourceManager::initResource(SoundResource *resource) { if (!resource) return; - Common::StackLock lock(_mutex); - SoundResource *res = retrieveFromChain(resource->getName()); // The driver does not replace resources with the same name, but disposes the new resource instead. // So these names seem to be considered "globally unique". @@ -1286,7 +1284,7 @@ void AudioMaster2Internal::fadeOut(int delay) { } bool AudioMaster2Internal::isFading() { - return _ready ? _io->isFading() : false; + return _io->isFading(); } void AudioMaster2Internal::setMusicVolume(int volume) { @@ -1315,18 +1313,18 @@ void AudioMaster2Internal::resetCounter() { } int AudioMaster2Internal::getPlayDuration() { - return _ready ? _durationCounter : 0; + return _durationCounter; } void AudioMaster2Internal::sync(SoundResource *res) { if (!_ready || !res) return; - Common::StackLock lock(_mutex); - if (res->getType() != 1) return; + Common::StackLock lock(_mutex); + SoundResourceSMUS *smus = static_cast(res); _io->_tempo = smus->getTempo(); smus->setSync(_io->_sync); -- cgit v1.2.3