[Scummvm-git-logs] scummvm master -> 3f7619357f33910cf2453f1883766316109ae75c
OMGPizzaGuy
noreply at scummvm.org
Mon Jan 22 01:53:02 UTC 2024
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:
3f7619357f ULTIMA8: Fix neverending Lava Noise.
Commit: 3f7619357f33910cf2453f1883766316109ae75c
https://github.com/scummvm/scummvm/commit/3f7619357f33910cf2453f1883766316109ae75c
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-01-21T19:52:48-06:00
Commit Message:
ULTIMA8: Fix neverending Lava Noise.
Properly mark ambient sounds from instrisic function and stop sounds on a audio channel before playing the next.
Fixes #14313
Changed paths:
engines/ultima/ultima8/audio/audio_channel.cpp
engines/ultima/ultima8/audio/audio_process.cpp
diff --git a/engines/ultima/ultima8/audio/audio_channel.cpp b/engines/ultima/ultima8/audio/audio_channel.cpp
index a1df353ea2d..f83aab6ca1a 100644
--- a/engines/ultima/ultima8/audio/audio_channel.cpp
+++ b/engines/ultima/ultima8/audio/audio_channel.cpp
@@ -94,6 +94,7 @@ void AudioChannel::playSample(AudioSample *sample, int loop, int priority, bool
int vol = (_lVol + _rVol) / 2; // range is 0 ~ 255
int balance = (_rVol - _lVol) / 2; // range is -127 ~ +127
+ _mixer->stopHandle(_soundHandle);
_mixer->playStream(isSpeech ? Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType, &_soundHandle, stream, -1, vol, balance);
if (_pitchShift != AudioProcess::PITCH_SHIFT_NONE)
_mixer->setChannelRate(_soundHandle, stream->getRate() * pitchShift / AudioProcess::PITCH_SHIFT_NONE);
diff --git a/engines/ultima/ultima8/audio/audio_process.cpp b/engines/ultima/ultima8/audio/audio_process.cpp
index e4085074e14..c6b0686545a 100644
--- a/engines/ultima/ultima8/audio/audio_process.cpp
+++ b/engines/ultima/ultima8/audio/audio_process.cpp
@@ -536,7 +536,7 @@ uint32 AudioProcess::I_playAmbientSFX(const uint8 *args, unsigned int argsize) {
AudioProcess *ap = AudioProcess::get_instance();
if (ap)
- ap->playSFX(sfxNum, priority, objId, -1, true);
+ ap->playSFX(sfxNum, priority, objId, -1, true, PITCH_SHIFT_NONE, 0xff, true);
else
warning("No AudioProcess");
More information about the Scummvm-git-logs
mailing list