[Scummvm-git-logs] scummvm master -> afc11081347a1c09550507382a45e9c5008f8de6
dreammaster
noreply at scummvm.org
Thu Dec 2 04:53:30 UTC 2021
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
13e4a66d2f XEEN: remove dead code
0a2044e5de XEEN: remove dead code
d393bca837 XEEN: fix some sounds not being correctly muted when Efx is off
2ed47004b5 XEEN: fix missing music when loading a save from the main menu
0e25d23256 XEEN: fix toggling music back on
afc1108134 XEEN: fix sound settings not getting saved
Commit: 13e4a66d2f3dc7047af39ccea0266a59ea5f5206
https://github.com/scummvm/scummvm/commit/13e4a66d2f3dc7047af39ccea0266a59ea5f5206
Author: Benoit Pierre (benoit.pierre at gmail.com)
Date: 2021-12-01T20:53:25-08:00
Commit Message:
XEEN: remove dead code
`Sound::playSong(const byte *data)` and `Sound::restartSong()` are never used.
Changed paths:
engines/xeen/sound.h
diff --git a/engines/xeen/sound.h b/engines/xeen/sound.h
index 613299c6dc..d8b23f2a94 100644
--- a/engines/xeen/sound.h
+++ b/engines/xeen/sound.h
@@ -86,11 +86,6 @@ public:
*/
void stopSong() { songCommand(STOP_SONG); }
- /**
- * Restart a previously playing song (which must still be loaded)
- */
- void restartSong() { songCommand(RESTART_SONG); }
-
/**
* Sets the in-game music volume percent. This is separate from the ScummVM volume
*/
@@ -106,13 +101,6 @@ public:
*/
void playSong(const Common::String &name, int param = 0);
- /**
- * Plays a song
- */
- void playSong(const byte *data) {
- _SoundDriver->playSong(data);
- }
-
/**
* Returns true if music is playing
*/
Commit: 0a2044e5de5fa9c7a6931943ca2f45b8f1e7711d
https://github.com/scummvm/scummvm/commit/0a2044e5de5fa9c7a6931943ca2f45b8f1e7711d
Author: Benoit Pierre (benoit.pierre at gmail.com)
Date: 2021-12-01T20:53:25-08:00
Commit Message:
XEEN: remove dead code
There's no need for `Sound::_priorMusic`.
Changed paths:
engines/xeen/sound.cpp
engines/xeen/sound.h
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp
index 0b7540e75a..f16e076f10 100644
--- a/engines/xeen/sound.cpp
+++ b/engines/xeen/sound.cpp
@@ -193,7 +193,6 @@ void Sound::playSong(Common::SeekableReadStream &stream) {
}
void Sound::playSong(const Common::String &name, int param) {
- _priorMusic = _currentMusic;
_currentMusic = name;
Common::File mf;
diff --git a/engines/xeen/sound.h b/engines/xeen/sound.h
index d8b23f2a94..ba4096dfe5 100644
--- a/engines/xeen/sound.h
+++ b/engines/xeen/sound.h
@@ -59,7 +59,7 @@ private:
public:
bool _fxOn;
bool _musicOn;
- Common::String _currentMusic, _priorMusic;
+ Common::String _currentMusic;
int _musicSide;
bool _subtitles;
public:
Commit: d393bca837842ceec7ab3740bf3d0842747d92ad
https://github.com/scummvm/scummvm/commit/d393bca837842ceec7ab3740bf3d0842747d92ad
Author: Benoit Pierre (benoit.pierre at gmail.com)
Date: 2021-12-01T20:53:25-08:00
Commit Message:
XEEN: fix some sounds not being correctly muted when Efx is off
Changed paths:
engines/xeen/sound.cpp
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp
index f16e076f10..d12f6eba06 100644
--- a/engines/xeen/sound.cpp
+++ b/engines/xeen/sound.cpp
@@ -77,13 +77,13 @@ void Sound::playSound(const Common::String &name, int ccNum, int unused) {
}
void Sound::playVoice(const Common::String &name, int ccMode) {
+ stopSound();
+ if (!_fxOn)
+ return;
File f;
bool result = (ccMode == -1) ? f.open(name) : f.open(name, ccMode);
if (!result)
error("Could not open sound - %s", name.c_str());
-
- stopSound();
-
Common::SeekableReadStream *srcStream = f.readStream(f.size());
Audio::SeekableAudioStream *stream = Audio::makeVOCStream(srcStream,
Audio::FLAG_UNSIGNED, DisposeAfterUse::YES);
@@ -148,6 +148,8 @@ void Sound::loadEffectsData() {
void Sound::playFX(uint effectId) {
stopFX();
+ if (!_fxOn)
+ return;
loadEffectsData();
if (effectId < _effectsOffsets.size()) {
Commit: 2ed47004b5418fc53c031663a6bca54e18a13d3a
https://github.com/scummvm/scummvm/commit/2ed47004b5418fc53c031663a6bca54e18a13d3a
Author: Benoit Pierre (benoit.pierre at gmail.com)
Date: 2021-12-01T20:53:25-08:00
Commit Message:
XEEN: fix missing music when loading a save from the main menu
Changed paths:
engines/xeen/map.cpp
engines/xeen/sound.cpp
diff --git a/engines/xeen/map.cpp b/engines/xeen/map.cpp
index 1dc700ac73..c623e994a5 100644
--- a/engines/xeen/map.cpp
+++ b/engines/xeen/map.cpp
@@ -901,8 +901,7 @@ void Map::load(int mapId) {
} else {
musName = "outdoors.m";
}
- if (musName != sound._currentMusic)
- sound.playSong(musName, 207);
+ sound.playSong(musName, 207);
// Load sprite sets needed for scene rendering
_groundSprites.load("water.out");
@@ -938,8 +937,7 @@ void Map::load(int mapId) {
} else {
musName = Res.MUSIC_FILES1[MUS_INDEXES[_mazeData->_wallKind]];
}
- if (musName != sound._currentMusic)
- sound.playSong(musName, 207);
+ sound.playSong(musName, 207);
// Load sprite sets needed for scene rendering
_skySprites[1].load(Common::String::format("%s.sky",
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp
index d12f6eba06..b72bbbe63e 100644
--- a/engines/xeen/sound.cpp
+++ b/engines/xeen/sound.cpp
@@ -195,6 +195,8 @@ void Sound::playSong(Common::SeekableReadStream &stream) {
}
void Sound::playSong(const Common::String &name, int param) {
+ if (isMusicPlaying() && name == _currentMusic)
+ return;
_currentMusic = name;
Common::File mf;
Commit: 0e25d23256e35f6eb688ec31e7636450c2aeb359
https://github.com/scummvm/scummvm/commit/0e25d23256e35f6eb688ec31e7636450c2aeb359
Author: Benoit Pierre (benoit.pierre at gmail.com)
Date: 2021-12-01T20:53:25-08:00
Commit Message:
XEEN: fix toggling music back on
Changed paths:
engines/xeen/sound.cpp
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp
index b72bbbe63e..ca4f7aedb1 100644
--- a/engines/xeen/sound.cpp
+++ b/engines/xeen/sound.cpp
@@ -235,6 +235,8 @@ void Sound::updateSoundSettings() {
_musicOn = !ConfMan.getBool("music_mute");
if (!_musicOn)
stopSong();
+ else if (!_currentMusic.empty())
+ playSong(_currentMusic);
_subtitles = ConfMan.hasKey("subtitles") ? ConfMan.getBool("subtitles") : true;
_musicVolume = CLIP(ConfMan.getInt("music_volume"), 0, 255);
Commit: afc11081347a1c09550507382a45e9c5008f8de6
https://github.com/scummvm/scummvm/commit/afc11081347a1c09550507382a45e9c5008f8de6
Author: Benoit Pierre (benoit.pierre at gmail.com)
Date: 2021-12-01T20:53:25-08:00
Commit Message:
XEEN: fix sound settings not getting saved
Changed paths:
engines/xeen/sound.cpp
diff --git a/engines/xeen/sound.cpp b/engines/xeen/sound.cpp
index ca4f7aedb1..7bace45ca8 100644
--- a/engines/xeen/sound.cpp
+++ b/engines/xeen/sound.cpp
@@ -109,6 +109,7 @@ void Sound::setFxOn(bool isOn) {
ConfMan.setBool("sfx_mute", !isOn);
if (isOn)
ConfMan.setBool("mute", false);
+ ConfMan.flushToDisk();
g_vm->syncSoundSettings();
}
@@ -212,6 +213,7 @@ void Sound::setMusicOn(bool isOn) {
ConfMan.setBool("music_mute", !isOn);
if (isOn)
ConfMan.setBool("mute", false);
+ ConfMan.flushToDisk();
g_vm->syncSoundSettings();
}
More information about the Scummvm-git-logs
mailing list