[Scummvm-git-logs] scummvm master -> 8701b1ba549389d6412fda923aee700f0ec1e1c0
alxpnv
noreply at scummvm.org
Mon Oct 31 12:05:32 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8701b1ba54 ASYLUM: fix changing SFX volume also changes Voice volume
Commit: 8701b1ba549389d6412fda923aee700f0ec1e1c0
https://github.com/scummvm/scummvm/commit/8701b1ba549389d6412fda923aee700f0ec1e1c0
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2022-10-31T15:09:10+03:00
Commit Message:
ASYLUM: fix changing SFX volume also changes Voice volume
Bug no. 13912
Changed paths:
engines/asylum/system/sound.cpp
diff --git a/engines/asylum/system/sound.cpp b/engines/asylum/system/sound.cpp
index 619c0ff9c51..3183e835587 100644
--- a/engines/asylum/system/sound.cpp
+++ b/engines/asylum/system/sound.cpp
@@ -76,8 +76,24 @@ void Sound::playSound(ResourceId resourceId, bool looping, int32 volume, int32 p
// Original sets position back to 0
_mixer->stopHandle(item->handle);
+ Audio::Mixer::SoundType soundType;
+ switch (RESOURCE_PACK(resourceId)) {
+ case kResourcePackShared:
+ soundType = Audio::Mixer::kPlainSoundType;
+ break;
+
+ case kResourcePackSpeech:
+ case kResourcePackSharedSound:
+ soundType = Audio::Mixer::kSpeechSoundType;
+ break;
+
+ default:
+ soundType = Audio::Mixer::kSFXSoundType;
+ break;
+ }
+
ResourceEntry *resource = getResource()->get(resourceId);
- playSoundData(Audio::Mixer::kSFXSoundType, &item->handle, resource->data, resource->size, looping, volume, panning);
+ playSoundData(soundType, &item->handle, resource->data, resource->size, looping, volume, panning);
}
void Sound::playMusic(ResourceId resourceId, int32 volume) {
More information about the Scummvm-git-logs
mailing list