mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 12:55:24 +00:00
TWP: Fix audio crash when loading savegames
This commit is contained in:
parent
f69d2c35e0
commit
efc6ee8752
@ -248,7 +248,7 @@ int AudioSystem::play(Common::SharedPtr<SoundDefinition> sndDef, Audio::Mixer::S
|
||||
return 0;
|
||||
|
||||
const Common::String &name = sndDef->getName();
|
||||
Audio::SeekableAudioStream *audioStream;
|
||||
Audio::SeekableAudioStream *audioStream = nullptr;
|
||||
if (name.hasSuffixIgnoreCase(".ogg")) {
|
||||
slot->stream.open(sndDef);
|
||||
audioStream = Audio::makeVorbisStream(&slot->stream, DisposeAfterUse::NO);
|
||||
|
@ -172,9 +172,7 @@ int ResManager::newCallbackId() {
|
||||
}
|
||||
|
||||
void ResManager::resetIds(int callbackId) {
|
||||
// don't reset _roomId, _objId and _actorId because there are not dynamically created
|
||||
_soundDefId = START_SOUNDDEFID;
|
||||
_soundId = START_SOUNDID;
|
||||
// don't reset _roomId, _objId, _soundDefId, _soundId and _actorId because there are not dynamically created
|
||||
_threadId = START_THREADID;
|
||||
_lightId = START_LIGHTID;
|
||||
_callbackId = callbackId;
|
||||
|
Loading…
x
Reference in New Issue
Block a user