[Scummvm-cvs-logs] scummvm master -> 50d9fb24d32ba0722b52b2e021568db2fdda4ac9

m-kiewitz m_kiewitz at users.sourceforge.net
Thu Jul 2 12:54:05 CEST 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
50d9fb24d3 AUDIO: Miles Audio AdLib: init panning to 63


Commit: 50d9fb24d32ba0722b52b2e021568db2fdda4ac9
    https://github.com/scummvm/scummvm/commit/50d9fb24d32ba0722b52b2e021568db2fdda4ac9
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2015-07-02T12:53:20+02:00

Commit Message:
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.

Changed paths:
    audio/miles_adlib.cpp



diff --git a/audio/miles_adlib.cpp b/audio/miles_adlib.cpp
index 8d6b1d6..6697122 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) {






More information about the Scummvm-git-logs mailing list