[Scummvm-git-logs] scummvm master -> cca341804b636b9acbd55638d15cb61a9dcb27a1

waltervn walter at vanniftrik-it.nl
Tue Feb 21 11:37:19 CET 2017


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:
9865ee16f7 ADL: Use 0-sample for speaker silence
cca341804b ADL: Add detection entry for hires4


Commit: 9865ee16f7f5301503cc63e644f009e70465c3b1
    https://github.com/scummvm/scummvm/commit/9865ee16f7f5301503cc63e644f009e70465c3b1
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-02-21T11:35:31+01:00

Commit Message:
ADL: Use 0-sample for speaker silence

This reduces popping noises

Changed paths:
    engines/adl/sound.cpp


diff --git a/engines/adl/sound.cpp b/engines/adl/sound.cpp
index 63eea45..3d46ea0 100644
--- a/engines/adl/sound.cpp
+++ b/engines/adl/sound.cpp
@@ -47,10 +47,9 @@ private:
 
 Speaker::Speaker(int sampleRate) :
 		_rate(sampleRate),
-		_curSample(32767) {
-
-	stopTone();
-}
+		_halfWaveLen(0),
+		_halfWaveRem(0),
+		_curSample(32767) { }
 
 void Speaker::startTone(double freq) {
 	_halfWaveLen = _halfWaveRem = doubleToFrac(_rate / freq / 2);
@@ -63,10 +62,15 @@ void Speaker::startTone(double freq) {
 
 void Speaker::stopTone() {
 	_halfWaveLen = 0;
-	_halfWaveRem = intToFrac(32767);
 }
 
 void Speaker::generateSamples(int16 *buffer, int numSamples) {
+	if (_halfWaveLen == 0) {
+		// Silence
+		memset(buffer, 0, numSamples * sizeof(int16));
+		return;
+	}
+
 	int offset = 0;
 
 	while (offset < numSamples) {
@@ -79,15 +83,14 @@ void Speaker::generateSamples(int16 *buffer, int numSamples) {
 			// Compute next transition point
 			_halfWaveRem += _halfWaveLen - FRAC_ONE;
 		} else {
-			// Low/high level (incl. silence)
+			// Low/high level
 			// Generate as many samples as we can
 			const int samples = MIN(numSamples - offset, (int)fracToInt(_halfWaveRem));
 			Common::fill(buffer + offset, buffer + offset + samples, _curSample);
 			offset += samples;
 
-			// Count down to level transition point, unless we're playing silence
-			if (_halfWaveLen > 0)
-				_halfWaveRem -= intToFrac(samples);
+			// Count down to level transition point
+			_halfWaveRem -= intToFrac(samples);
 		}
 	}
 }


Commit: cca341804b636b9acbd55638d15cb61a9dcb27a1
    https://github.com/scummvm/scummvm/commit/cca341804b636b9acbd55638d15cb61a9dcb27a1
Author: Walter van Niftrik (walter at scummvm.org)
Date: 2017-02-21T11:35:31+01:00

Commit Message:
ADL: Add detection entry for hires4

Changed paths:
    engines/adl/detection.cpp


diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp
index 66bbe84..02fadd2 100644
--- a/engines/adl/detection.cpp
+++ b/engines/adl/detection.cpp
@@ -141,6 +141,21 @@ static const AdlGameDescription gameDescriptions[] = {
 		},
 		GAME_TYPE_HIRES0
 	},
+	{ // Hi-Res Adventure #4: Ulysses and the Golden Fleece - Apple II - Load 'N' Go
+		{
+			"hires4", 0,
+			{
+				{ "ULYSSESA.DSK", 0, "df21f28ae94440f958dbbcfdfaf0c36e", 143360 },
+				{ "ULYSSESB.DSK", 1, "c204e8fe265e9534049f3c0f816cc9fc", 143360 },
+				AD_LISTEND
+			},
+			Common::EN_ANY,
+			Common::kPlatformApple2,
+			ADGF_UNSTABLE,
+			GUIO2(GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_SCANLINES)
+		},
+		GAME_TYPE_HIRES4
+	},
 	{ // Hi-Res Adventure #4: Ulysses and the Golden Fleece - Atari 8-bit - Re-release
 		{
 			"hires4", 0,





More information about the Scummvm-git-logs mailing list