aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorMartin Kiewitz2015-07-02 12:53:20 +0200
committerMartin Kiewitz2015-07-02 12:53:20 +0200
commit50d9fb24d32ba0722b52b2e021568db2fdda4ac9 (patch)
tree9cf8fef3b4e7ec955b375a2af1d0e6697de0adc0 /audio
parent46babcc3c4cd062b2d442435039ea67cff46b61b (diff)
downloadscummvm-rg350-50d9fb24d32ba0722b52b2e021568db2fdda4ac9.tar.gz
scummvm-rg350-50d9fb24d32ba0722b52b2e021568db2fdda4ac9.tar.bz2
scummvm-rg350-50d9fb24d32ba0722b52b2e021568db2fdda4ac9.zip
AUDIO: Miles Audio AdLib: init panning to 63
simon 2 + return to zork are getting output on one speaker only atm. both games don't get panning controller at all and the original driver itself definitely did initialize it to 0. We initialize panning to 63, so that this gets fixed for the moment. needs to get investigated further.
Diffstat (limited to 'audio')
-rw-r--r--audio/miles_adlib.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/audio/miles_adlib.cpp b/audio/miles_adlib.cpp
index 8d6b1d6177..6697122492 100644
--- a/audio/miles_adlib.cpp
+++ b/audio/miles_adlib.cpp
@@ -349,6 +349,13 @@ void MidiDriver_Miles_AdLib::resetData() {
// Miles Audio 2: hardcoded pitch range as a global (not channel specific), set to 12
// Miles Audio 3: pitch range per MIDI channel
_midiChannels[midiChannel].currentVolumeExpression = 127;
+
+ // TODO: Miles Audio had currentPanning initialized to 0 inside the driver
+ // Simon the sorcerer 2 as well as Return To Zork don't change this control at all
+ // inside their XMIDI files, so currentPanning set to 0 will create output output on
+ // one speaker only. Maybe there were some default MIDI commands sent to the driver before
+ // playing the music. Needs to get investigated further.
+ _midiChannels[midiChannel].currentPanning = 63; // center
}
}
@@ -892,6 +899,7 @@ void MidiDriver_Miles_AdLib::controlChange(byte midiChannel, byte controllerNumb
switch (controllerNumber) {
case MILES_CONTROLLER_SELECT_PATCH_BANK:
+ //warning("patch bank channel %d, bank %x", midiChannel, controllerValue);
_midiChannels[midiChannel].currentPatchBank = controllerValue;
break;
@@ -981,6 +989,8 @@ void MidiDriver_Miles_AdLib::programChange(byte midiChannel, byte patchId) {
const InstrumentEntry *instrumentPtr = NULL;
byte patchBank = _midiChannels[midiChannel].currentPatchBank;
+ //warning("patch channel %d, patch %x, bank %x", midiChannel, patchId, patchBank);
+
// we check, if we actually have data for the requested instrument...
instrumentPtr = searchInstrument(patchBank, patchId);
if (!instrumentPtr) {