[Scummvm-cvs-logs] scummvm master -> b4df7868a1c6c846014159b31fc846c7426f1b9c

bluegr bluegr at gmail.com
Wed Mar 27 22:07:25 CET 2013


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

Summary:
3f01f34b1f MT-32: Sync with the latest changes in munt
b4df7868a1 SCI: Remove some useless checks in the MIDI driver


Commit: 3f01f34b1fa7efaccbcfc32c5ce97515a80eb12e
    https://github.com/scummvm/scummvm/commit/3f01f34b1fa7efaccbcfc32c5ce97515a80eb12e
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-03-27T14:01:47-07:00

Commit Message:
MT-32: Sync with the latest changes in munt

This syncs our code with munt commit 15e9f65

Changed paths:
    audio/softsynth/mt32/LA32WaveGenerator.cpp



diff --git a/audio/softsynth/mt32/LA32WaveGenerator.cpp b/audio/softsynth/mt32/LA32WaveGenerator.cpp
index 5b2c900..8065069 100644
--- a/audio/softsynth/mt32/LA32WaveGenerator.cpp
+++ b/audio/softsynth/mt32/LA32WaveGenerator.cpp
@@ -32,10 +32,10 @@ static const LogSample SILENCE = {65535, LogSample::POSITIVE};
 
 Bit16u LA32Utilites::interpolateExp(const Bit16u fract) {
 	Bit16u expTabIndex = fract >> 3;
-	Bit16u extraBits = fract & 7;
+	Bit16u extraBits = ~fract & 7;
 	Bit16u expTabEntry2 = 8191 - Tables::getInstance().exp9[expTabIndex];
 	Bit16u expTabEntry1 = expTabIndex == 0 ? 8191 : (8191 - Tables::getInstance().exp9[expTabIndex - 1]);
-	return expTabEntry1 + (((expTabEntry2 - expTabEntry1) * extraBits) >> 3);
+	return expTabEntry2 + (((expTabEntry1 - expTabEntry2) * extraBits) >> 3);
 }
 
 Bit16s LA32Utilites::unlog(const LogSample &logSample) {
@@ -55,7 +55,6 @@ void LA32Utilites::addLogSamples(LogSample &logSample1, const LogSample &logSamp
 Bit32u LA32WaveGenerator::getSampleStep() {
 	// sampleStep = EXP2F(pitch / 4096.0f + 4.0f)
 	Bit32u sampleStep = LA32Utilites::interpolateExp(~pitch & 4095);
-	sampleStep &= ~1;
 	sampleStep <<= pitch >> 12;
 	sampleStep >>= 8;
 	sampleStep &= ~1;
@@ -240,7 +239,7 @@ void LA32WaveGenerator::generateNextPCMWaveLogSamples() {
 	} else {
 		secondPCMLogSample = SILENCE;
 	}
-	// pcmSampleStep = EXP2F(pitch / 4096. - 5.);
+	// pcmSampleStep = (Bit32u)EXP2F(pitch / 4096.0f + 3.0f);
 	Bit32u pcmSampleStep = LA32Utilites::interpolateExp(~pitch & 4095);
 	pcmSampleStep <<= pitch >> 12;
 	// Seeing the actual lengths of the PCM wave for pitches 00..12,


Commit: b4df7868a1c6c846014159b31fc846c7426f1b9c
    https://github.com/scummvm/scummvm/commit/b4df7868a1c6c846014159b31fc846c7426f1b9c
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-03-27T14:06:27-07:00

Commit Message:
SCI: Remove some useless checks in the MIDI driver

Changed paths:
    engines/sci/sound/drivers/midi.cpp



diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 37eb37b..a3d0175 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -234,15 +234,9 @@ void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
 		}
 		break;
 	case 0x0a:
-		if (_channels[channel].pan == value)
-			return;
-
 		_channels[channel].pan = value;
 		break;
 	case 0x40:
-		if (_channels[channel].hold == value)
-			return;
-
 		_channels[channel].hold = value;
 		break;
 	case 0x4b:	// voice mapping
@@ -250,9 +244,6 @@ void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
 	case 0x4e:	// velocity
 		break;
 	case 0x7b:
-		if (!_channels[channel].playing)
-			return;
-
 		_channels[channel].playing = false;
 	default:
 		break;






More information about the Scummvm-git-logs mailing list