aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/sound.cpp
diff options
context:
space:
mode:
authorKari Salminen2007-08-18 15:54:29 +0000
committerKari Salminen2007-08-18 15:54:29 +0000
commita777b3e64f6b29f313b8a66a98c58dac62f70c78 (patch)
tree5a1922f3c821d703f1370ba9744854e72e658dbc /engines/agi/sound.cpp
parentd862dc430d81d963dd5297fdffb6f3eecfe239cf (diff)
downloadscummvm-rg350-a777b3e64f6b29f313b8a66a98c58dac62f70c78.tar.gz
scummvm-rg350-a777b3e64f6b29f313b8a66a98c58dac62f70c78.tar.bz2
scummvm-rg350-a777b3e64f6b29f313b8a66a98c58dac62f70c78.zip
Changed Apple IIGS sample playing frequency multiplier from 1076.0 to C6 (i.e. about 1046.5). Commented out a warning that comes too often.
svn-id: r28657
Diffstat (limited to 'engines/agi/sound.cpp')
-rw-r--r--engines/agi/sound.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/agi/sound.cpp b/engines/agi/sound.cpp
index 8527d11202..3bff875cc4 100644
--- a/engines/agi/sound.cpp
+++ b/engines/agi/sound.cpp
@@ -639,7 +639,7 @@ void SoundMgr::playSound() {
if (playingSound != -1) {
if (_vm->_game.sounds[playingSound]->type() == AGI_SOUND_MIDI) {
/* play_midi_sound (); */
- warning("playSound: Trying to play an Apple IIGS MIDI sound. Not yet implemented!");
+ //warning("playSound: Trying to play an Apple IIGS MIDI sound. Not yet implemented!");
playing = 0;
} else if (_vm->_game.sounds[playingSound]->type() == AGI_SOUND_SAMPLE) {
//debugC(3, kDebugLevelSound, "playSound: Trying to play an Apple IIGS sample");
@@ -687,8 +687,11 @@ uint32 SoundMgr::mixSound(void) {
//double hertz = 8.175798915644 * pow(SEMITONE, fracToDouble(chn.note));
// double step = getRate() / hertz;
// chn.posAdd = doubleToFrac(step);
-
- double hertz = 1076.0 * pow(SEMITONE, fracToDouble(chn.note));
+
+ // Frequency multiplier was 1076.0 based on tests made with MESS 0.117.
+ // Tests made with KEGS32 averaged the multiplier to around 1045.
+ // So this is a guess but maybe it's 1046.5... i.e. C6's frequency?
+ double hertz = C6_FREQ * pow(SEMITONE, fracToDouble(chn.note));
chn.posAdd = doubleToFrac(hertz / getRate());
chn.vol = doubleToFrac(fracToDouble(chn.envVol) * fracToDouble(chn.chanVol) / 127.0);
double tempVol = fracToDouble(chn.vol)/127.0;