mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
Patch #2131406: AGI: Fix Crash with Apple][ Instruments.
Applied the patch as it is, thanks clone2727. Now Apple IIGS AGI games don't crash anymore if the instruments (They're in *.SYS16) or the instrument samples (They're in SIERRASTANDARD) aren't found. svn-id: r34798
This commit is contained in:
parent
c2066b9c20
commit
c949eb2dac
@ -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) {
|
||||
|
@ -467,6 +467,7 @@ private:
|
||||
int _endflag;
|
||||
int _playingSound;
|
||||
uint8 _env;
|
||||
bool _disabledMidi;
|
||||
|
||||
int16 *_sndBuffer;
|
||||
const int16 *_waveform;
|
||||
|
Loading…
Reference in New Issue
Block a user