[Scummvm-git-logs] scummvm branch-2-7 -> ba654731365c41fe2d1ca376eed3f468074adc54
criezy
noreply at scummvm.org
Wed Mar 29 21:08:04 UTC 2023
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:
ba65473136 AGS: fixed find_free_audio_channel() incorrect compat fix
Commit: ba654731365c41fe2d1ca376eed3f468074adc54
https://github.com/scummvm/scummvm/commit/ba654731365c41fe2d1ca376eed3f468074adc54
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-03-29T22:07:56+01:00
Commit Message:
AGS: fixed find_free_audio_channel() incorrect compat fix
>From upstream b3f4909.
Fixes a regression from d2b0380 (86564e9 in upstream) where the extra
channel allowance was added excessively for all cases.
Fixes bug #14353 (crash in unavowed).
Changed paths:
engines/ags/engine/media/audio/audio.cpp
diff --git a/engines/ags/engine/media/audio/audio.cpp b/engines/ags/engine/media/audio/audio.cpp
index dd7202e16f6..8d9bc39d037 100644
--- a/engines/ags/engine/media/audio/audio.cpp
+++ b/engines/ags/engine/media/audio/audio.cpp
@@ -155,7 +155,7 @@ static int find_free_audio_channel(ScriptAudioClip *clip, int priority, bool int
// NOTE: in backward compat mode we allow to place sound on a crossfade channel
int startAtChannel = _G(reserved_channel_count);
- int endBeforeChannel = _GP(game).numCompatGameChannels;
+ int endBeforeChannel = _GP(game).numGameChannels;
if (_GP(game).audioClipTypes[clip->type].reservedChannels > 0) {
startAtChannel = 0;
@@ -163,6 +163,7 @@ static int find_free_audio_channel(ScriptAudioClip *clip, int priority, bool int
startAtChannel += MIN(MAX_SOUND_CHANNELS,
_GP(game).audioClipTypes[i].reservedChannels);
}
+ // NOTE: we allow to place sound on a crossfade channel for backward compatibility
endBeforeChannel = MIN(_GP(game).numCompatGameChannels,
startAtChannel + _GP(game).audioClipTypes[clip->type].reservedChannels);
}
More information about the Scummvm-git-logs
mailing list