From 50d9fb24d32ba0722b52b2e021568db2fdda4ac9 Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Thu, 2 Jul 2015 12:53:20 +0200 Subject: 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. --- audio/miles_adlib.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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) { -- cgit v1.2.3