diff options
author | eriktorbjorn | 2011-06-10 19:41:31 +0200 |
---|---|---|
committer | eriktorbjorn | 2011-06-10 19:41:31 +0200 |
commit | 0c1665820bf91aba10adf9abd7bca286b7c17982 (patch) | |
tree | 92809312b7ba1e0d48af291aa6d3a81231e1d791 /engines | |
parent | ca825e1dba5dedabd3505892a1001be7e13cf6ca (diff) | |
download | scummvm-rg350-0c1665820bf91aba10adf9abd7bca286b7c17982.tar.gz scummvm-rg350-0c1665820bf91aba10adf9abd7bca286b7c17982.tar.bz2 scummvm-rg350-0c1665820bf91aba10adf9abd7bca286b7c17982.zip |
AGI: Experimental fix for bug #3292778 ("SQ2: Music missing notes")
The idea here is that if two voices are generating the same tone,
the square wave generator should be in sync so that the wave forms
amplify each other, rather than cancelling each other out.
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/sound_pcjr.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/engines/agi/sound_pcjr.cpp b/engines/agi/sound_pcjr.cpp index 319b7049ed..fdebf16b1a 100644 --- a/engines/agi/sound_pcjr.cpp +++ b/engines/agi/sound_pcjr.cpp @@ -219,6 +219,7 @@ int SoundGenPCJr::volumeCalc(SndGenChan *chan) { // return 0 if it's passing more data // return -1 if it's passing nothing (end of data) int SoundGenPCJr::getNextNote(int ch, Tone *tone) { + ToneChan *tpcm; SndGenChan *chan; const byte *data; @@ -228,6 +229,7 @@ int SoundGenPCJr::getNextNote(int ch, Tone *tone) { if (!_vm->getflag(fSoundOn)) return -1; + tpcm = &_tchannel[ch]; chan = &_channel[ch]; if (!chan->avail) return -1; @@ -241,6 +243,9 @@ int SoundGenPCJr::getNextNote(int ch, Tone *tone) { // if it's 0 then it's not going to be played // if it's 0xFFFF then the channel data has finished. if ((chan->duration != 0) && (chan->duration != 0xFFFF)) { + tpcm->genTypePrev = -1; + tpcm->freqCountPrev = -1; + // only tone channels dissolve if ((ch != 3) && (_dissolveMethod != 0)) // != noise?? chan->dissolveCount = 0; |