[Scummvm-git-logs] scummvm master -> 557680bdb771a5bc83889a53ba69f0801f61275f

sev- sev at scummvm.org
Sun Sep 11 11:05:17 CEST 2016


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:
5cc2696deb AUDIO: Fix CMS chips incorrect pitch.
557680bdb7 Merge pull request #825 from jepael/fix-cms-pitch


Commit: 5cc2696deb01041b71e3deaf9f6747f75470d24b
    https://github.com/scummvm/scummvm/commit/5cc2696deb01041b71e3deaf9f6747f75470d24b
Author: jepael (jepael at users.noreply.github.com)
Date: 2016-09-07T23:22:18+03:00

Commit Message:
AUDIO: Fix CMS chips incorrect pitch.

The CMS emulation assumes the chips run at 8 MHz clock,
but in PCs they run at 7.15909 MHz, so the emulated pitch
is too high. Adjusting the requested sampling rate higher
by matching amount the pitch is lowered down to normal.

Changed paths:
    audio/softsynth/cms.h



diff --git a/audio/softsynth/cms.h b/audio/softsynth/cms.h
index 8c0f980..64df30e 100644
--- a/audio/softsynth/cms.h
+++ b/audio/softsynth/cms.h
@@ -68,7 +68,9 @@ struct SAA1099 {
 class CMSEmulator {
 public:
 	CMSEmulator(uint32 sampleRate) {
-		_sampleRate = sampleRate;
+		// In PCs the chips run at 7.15909 MHz instead of 8 MHz.
+		// Adjust sampling rate upwards to bring pitch down.
+		_sampleRate = (sampleRate * 352) / 315;
 		memset(_saa1099, 0, sizeof(SAA1099)*2);
 	}
 


Commit: 557680bdb771a5bc83889a53ba69f0801f61275f
    https://github.com/scummvm/scummvm/commit/557680bdb771a5bc83889a53ba69f0801f61275f
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-09-11T11:05:14+02:00

Commit Message:
Merge pull request #825 from jepael/fix-cms-pitch

AUDIO: Fix CMS chips incorrect pitch.

Changed paths:
    audio/softsynth/cms.h








More information about the Scummvm-git-logs mailing list