[Scummvm-git-logs] scummvm master -> 494ec37f20e3560d5e82829612086262401720e2
bluegr
noreply at scummvm.org
Fri Jul 5 07:22:51 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:
494ec37f20 DGDS: Disable multiple MIDI player instances for music + SFX
Commit: 494ec37f20e3560d5e82829612086262401720e2
https://github.com/scummvm/scummvm/commit/494ec37f20e3560d5e82829612086262401720e2
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2024-07-05T10:22:22+03:00
Commit Message:
DGDS: Disable multiple MIDI player instances for music + SFX
Simultaneous MIDI players aren't supported by the backend.
MIDI sound effects are deactivated for now, till this
functionality is implemented properly with a single instance
Changed paths:
engines/dgds/sound.cpp
diff --git a/engines/dgds/sound.cpp b/engines/dgds/sound.cpp
index ec42da7e91f..0c9cac04919 100644
--- a/engines/dgds/sound.cpp
+++ b/engines/dgds/sound.cpp
@@ -135,7 +135,8 @@ static uint32 _availableSndTracks(const byte *data, uint32 size) {
Sound::Sound(Audio::Mixer *mixer, ResourceManager *resource, Decompressor *decompressor) :
_mixer(mixer), _resource(resource), _decompressor(decompressor) {
_midiMusicPlayer = new DgdsMidiPlayer(false);
- _midiSoundPlayer = new DgdsMidiPlayer(true);
+ //_midiSoundPlayer = new DgdsMidiPlayer(true); // FIXME: Can't have multiple instances of OPL players
+ _midiSoundPlayer = nullptr;
}
Sound::~Sound() {
@@ -176,7 +177,7 @@ void Sound::playAmigaSfx(const Common::String &filename, byte channel, byte volu
void Sound::stopAllSfx() {
for (uint i = 0; i < ARRAYSIZE(_channels); i++)
stopSfx(i);
- _midiSoundPlayer->stop();
+ //_midiSoundPlayer->stop();
}
void Sound::stopSfx(byte channel) {
@@ -358,7 +359,7 @@ void Sound::playMusic(uint num) {
void Sound::playPCSound(uint num, const Common::Array<uint32> &sizeArray, const Common::Array<byte *> &dataArray, DgdsMidiPlayer *midiPlayer) {
if (num < dataArray.size()) {
uint32 tracks = _availableSndTracks(dataArray[num], sizeArray[num]);
- if (tracks & TRACK_MT32)
+ if (midiPlayer && (tracks & TRACK_MT32))
midiPlayer->play(dataArray[num], sizeArray[num]);
else if (tracks & DIGITAL_PCM)
playPCM(dataArray[num], sizeArray[num]);
More information about the Scummvm-git-logs
mailing list