[Scummvm-cvs-logs] CVS: scummvm/backends/midi/mt32 partial.cpp,1.3,1.4 synth.cpp,1.16,1.17
Eugene Sandulenko
sev at users.sourceforge.net
Sun Oct 24 12:22:08 CEST 2004
Update of /cvsroot/scummvm/scummvm/backends/midi/mt32
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26347
Modified Files:
partial.cpp synth.cpp
Log Message:
o Sync with upstream source
o Move back to old sawtooth filter, which sounds better
Index: partial.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/partial.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- partial.cpp 22 Oct 2004 15:39:27 -0000 1.3
+++ partial.cpp 24 Oct 2004 19:21:38 -0000 1.4
@@ -237,6 +237,15 @@
// to how it looks on the MT-32. What it really does it takes the
// square wave and multiplies it by a full cosine
// TODO: This area here crashes DosBox due to read overflow
+ if(toff < sawtable[noteval][partCache->pulsewidth]) {
+ ptemp = waveforms[2][noteval][(toff<<2)+minorplace];
+ } else {
+ ptemp = waveforms[3][noteval][(toff<<2)+minorplace];
+ }
+ ptemp = ptemp *4;
+
+// This is dosbox 0.62 canadacow's code. Reported to be worse than above 0.61 code
+#if 0
uint offsetpos = (toff<<2)+minorplace;
//int a = 0;
if(toff < sawtable[noteval][partCache->pulsewidth]) {
@@ -251,7 +260,8 @@
ptemp = waveforms[3][noteval][offsetpos];
}
ptemp = ptemp *4;
-
+#endif
+
// ptemp = (int)(sin((double)toff / 100.0) * 100.0);
//ptemp = pa;
Index: synth.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/midi/mt32/synth.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- synth.cpp 24 Oct 2004 15:04:19 -0000 1.16
+++ synth.cpp 24 Oct 2004 19:21:38 -0000 1.17
@@ -1386,8 +1386,11 @@
} 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 @@
//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);
More information about the Scummvm-git-logs
mailing list