diff options
author | Eugene Sandulenko | 2004-10-24 19:21:38 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-10-24 19:21:38 +0000 |
commit | 6fd31192e1413e2a84c22a28379278e5ee8a9355 (patch) | |
tree | dbfe236604f5bf49ac4cf46e9eb7403ff7e95cd9 /backends/midi/mt32/synth.cpp | |
parent | 53d10219858cd58542deb564156111aa83cc59ed (diff) | |
download | scummvm-rg350-6fd31192e1413e2a84c22a28379278e5ee8a9355.tar.gz scummvm-rg350-6fd31192e1413e2a84c22a28379278e5ee8a9355.tar.bz2 scummvm-rg350-6fd31192e1413e2a84c22a28379278e5ee8a9355.zip |
o Sync with upstream source
o Move back to old sawtooth filter, which sounds better
svn-id: r15683
Diffstat (limited to 'backends/midi/mt32/synth.cpp')
-rw-r--r-- | backends/midi/mt32/synth.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/midi/mt32/synth.cpp b/backends/midi/mt32/synth.cpp index d6215265dc..138ca29cb7 100644 --- a/backends/midi/mt32/synth.cpp +++ b/backends/midi/mt32/synth.cpp @@ -1386,8 +1386,11 @@ INLINE int32 getAmpEnvelope(dpoly::partialStatus *pStat, dpoly *poly) { } else { tc = tStat->envbase; tc = (tc + ((tStat->envdist * tStat->envpos) / tStat->envsize)); + + // TRISTAN if (tc < 0) tc = 0; + if((tStat->envpos >= tStat->envsize) || (tc == 0)){ pStat->PCMDone = true; pStat->isDecayed = true; @@ -2919,7 +2922,8 @@ bool CSynthMT32::InitTables() { //brsa = exp(pow(((float)tr * 0.0133),2)); brsa = exp(pow(((float)tr * 0.005),3)) * 125; - brsa = pow((float)10,((float)(tr/46.5)-1))/2; + //brsa = pow((float)10,((float)(tr/46.5)-1))/2; + brsa = pow((float)10,((float)(tr/55)-1))/2; //brsa = pow(exp((ftr-40)/40),1.15); //brsq = exp((ftr-35)/35); |