aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/sound.cpp6
-rw-r--r--engines/agi/sound.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 7138a3adad..7655b757f9 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -454,7 +454,7 @@ int SoundMgr::initSound() {
_waveform = waveformMac;
break;
case SOUND_EMU_APPLE2GS:
- loadInstruments();
+ _disabledMidi = !loadInstruments();
break;
}
@@ -514,6 +514,9 @@ void SoundMgr::playNote(int i, int freq, int vol) {
}
void SoundMgr::playMidiSound() {
+ if (_disabledMidi)
+ return;
+
const uint8 *p;
uint8 parm1, parm2;
static uint8 cmd, ch;
@@ -1218,6 +1221,7 @@ SoundMgr::SoundMgr(AgiBase *agi, Audio::Mixer *pMixer) : _chn() {
_playing = false;
_sndBuffer = (int16 *)calloc(2, BUFFER_SIZE);
_waveform = 0;
+ _disabledMidi = false;
}
void SoundMgr::premixerCall(int16 *data, uint len) {
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index 0a6f5e302d..fd178e3a1d 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -467,6 +467,7 @@ private:
int _endflag;
int _playingSound;
uint8 _env;
+ bool _disabledMidi;
int16 *_sndBuffer;
const int16 *_waveform;