diff options
author | athrxx | 2011-05-08 23:51:39 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2011-05-17 20:36:32 +0200 |
commit | 95c059598d31ebdb871b97a528ad361472fcd217 (patch) | |
tree | 65296406c58b2f6657de18583bee4327ad96416b /audio/softsynth/fmtowns_pc98 | |
parent | c6f13d187e31d5642f4a789a2e1eb2b5f2708775 (diff) | |
download | scummvm-rg350-95c059598d31ebdb871b97a528ad361472fcd217.tar.gz scummvm-rg350-95c059598d31ebdb871b97a528ad361472fcd217.tar.bz2 scummvm-rg350-95c059598d31ebdb871b97a528ad361472fcd217.zip |
FM-TOWNS AUDIO: Fix note off event in midi driver
Diffstat (limited to 'audio/softsynth/fmtowns_pc98')
-rw-r--r-- | audio/softsynth/fmtowns_pc98/towns_midi.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_midi.cpp b/audio/softsynth/fmtowns_pc98/towns_midi.cpp index 9fa6a8ceac..e22182632e 100644 --- a/audio/softsynth/fmtowns_pc98/towns_midi.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_midi.cpp @@ -569,11 +569,7 @@ int TownsMidiOutputChannel::lookupVolume(int a, int b) { } void TownsMidiOutputChannel::keyOn() { - // This driver uses only 2 operators and 2 algorithms (algorithm 5 and 7), - // since it is just a modified AdLib driver. It also uses AdLib programs. - // There are no FM-TOWNS specific programs. This is the reason for the FM-TOWNS - // music being so bad compared to AdLib (unsuitable data is just forced into the - // wrong audio device). + // This driver uses only 2 operators since it is just a modified AdLib driver. out(0x28, 0x30); } @@ -587,11 +583,7 @@ void TownsMidiOutputChannel::keyOnSetFreq(uint16 frq) { out(0xa4, frq >> 8); out(0xa0, frq & 0xff); out(0x28, 0); - // This driver uses only 2 operators and 2 algorithms (algorithm 5 and 7), - // since it is just a modified AdLib driver. It also uses AdLib programs. - // There are no FM-TOWNS specific programs. This is the reason for the FM-TOWNS - // music being so bad compared to AdLib (unsuitable data is just forced into the - // wrong audio device). + // This driver uses only 2 operators since it is just a modified AdLib driver. out(0x28, 0x30); } @@ -698,13 +690,15 @@ void TownsMidiInputChannel::noteOff(byte note) { if (!_out) return; - if (_out->_note != note) - return; + for (TownsMidiOutputChannel *oc = _out; oc; oc = oc->_next) { + if (oc->_note != note) + continue; - if (_sustain) - _out->_sustainNoteOff = 1; - else - _out->disconnect(); + if (_sustain) + oc->_sustainNoteOff = 1; + else + oc->disconnect(); + } } void TownsMidiInputChannel::noteOn(byte note, byte velocity) { @@ -743,7 +737,9 @@ void TownsMidiInputChannel::noteOn(byte note, byte velocity) { } void TownsMidiInputChannel::programChange(byte program) { - // Dysfunctional since this is all done inside the imuse code + // Not implemented (The loading and assignment of programs + // is handled externally by the SCUMM engine. The programs + // get sent via sysEx_customInstrument.) } void TownsMidiInputChannel::pitchBend(int16 bend) { @@ -816,7 +812,7 @@ void TownsMidiInputChannel::controlVolume(byte value) { } void TownsMidiInputChannel::controlPanPos(byte value) { - // not supported + // not implemented } void TownsMidiInputChannel::controlSustain(byte value) { |