diff options
Diffstat (limited to 'engines/kyra/sound/drivers/audiomaster2.cpp')
-rw-r--r-- | engines/kyra/sound/drivers/audiomaster2.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
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<SoundResourceSMUS*>(res); _io->_tempo = smus->getTempo(); smus->setSync(_io->_sync); |