aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-09-11 11:05:14 +0200
committerGitHub2016-09-11 11:05:14 +0200
commit557680bdb771a5bc83889a53ba69f0801f61275f (patch)
tree578875f4b70899c67e1ec682246cb01ace52b981
parent935d9f22d3a4e3d4048253c4788e512289d08359 (diff)
parent5cc2696deb01041b71e3deaf9f6747f75470d24b (diff)
downloadscummvm-rg350-557680bdb771a5bc83889a53ba69f0801f61275f.tar.gz
scummvm-rg350-557680bdb771a5bc83889a53ba69f0801f61275f.tar.bz2
scummvm-rg350-557680bdb771a5bc83889a53ba69f0801f61275f.zip
Merge pull request #825 from jepael/fix-cms-pitch
AUDIO: Fix CMS chips incorrect pitch.
-rw-r--r--audio/softsynth/cms.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/softsynth/cms.h b/audio/softsynth/cms.h
index 8c0f980b0a..64df30e037 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);
}