[Scummvm-git-logs] scummvm branch-2-8 -> b5a9893f462ad88872365745c050f256da823b08

OMGPizzaGuy noreply at scummvm.org
Tue Jan 23 00:18:05 UTC 2024


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fe182fd8fb ULTIMA8: Adjust audio channel rate using pitch shift variable
d1740d10cb ULTIMA8: Fix neverending Lava Noise.
b5a9893f46 NEW: Mention Ultima 8 audio fix


Commit: fe182fd8fb69f195b05316cbfa366ef556af8eac
    https://github.com/scummvm/scummvm/commit/fe182fd8fb69f195b05316cbfa366ef556af8eac
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-01-22T18:12:35-06:00

Commit Message:
ULTIMA8: Adjust audio channel rate using pitch shift variable

Changed paths:
    engines/ultima/ultima8/audio/audio_channel.cpp


diff --git a/engines/ultima/ultima8/audio/audio_channel.cpp b/engines/ultima/ultima8/audio/audio_channel.cpp
index a80e05311a1..adf034847c5 100644
--- a/engines/ultima/ultima8/audio/audio_channel.cpp
+++ b/engines/ultima/ultima8/audio/audio_channel.cpp
@@ -21,6 +21,7 @@
 
 #include "ultima/ultima8/misc/common_types.h"
 #include "ultima/ultima8/audio/audio_channel.h"
+#include "ultima/ultima8/audio/audio_process.h"
 #include "ultima/ultima8/audio/audio_sample.h"
 #include "common/memstream.h"
 #include "audio/audiostream.h"
@@ -92,7 +93,10 @@ void AudioChannel::playSample(AudioSample *sample, int loop, int priority, bool
 	// Play it
 	int vol = (_lVol + _rVol) / 2;		 // range is 0 ~ 255
 	int balance = (_rVol - _lVol) / 2; // range is -127 ~ +127
+
 	_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);
 	if (paused)
 		_mixer->pauseHandle(_soundHandle, true);
 }


Commit: d1740d10cb3bd45bf6d42461b811214c9c85a0be
    https://github.com/scummvm/scummvm/commit/d1740d10cb3bd45bf6d42461b811214c9c85a0be
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-01-22T18:12:44-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 adf034847c5..eed2afd305f 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");
 


Commit: b5a9893f462ad88872365745c050f256da823b08
    https://github.com/scummvm/scummvm/commit/b5a9893f462ad88872365745c050f256da823b08
Author: Matthew Jimenez (matthew.jimenez at outlook.com)
Date: 2024-01-22T18:17:43-06:00

Commit Message:
NEW: Mention Ultima 8 audio fix

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index a21fc5e3308..daca33fd167 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -40,6 +40,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Fix Ultima VIII unexpected jumping on left click.
    - Fix Ultima VIII camera during cutscenes for Shrine of the Ancient Ones.
    - Fix Ultima VIII invalid placement of items within containers.
+   - Fix Ultima VIII never-ending lava sounds.
 
  Android port:
    - Fixed crash in built-in help with German language.




More information about the Scummvm-git-logs mailing list