Almos thtere maybe?

This commit is contained in:
cnlohr
2024-07-13 01:49:39 -07:00
parent 64c8253055
commit 84b7b478c0
+5 -3
View File
@@ -429,11 +429,13 @@ async function sendLoop()
else if( targetModulation == 1 ) else if( targetModulation == 1 )
{ /* FM */ { /* FM */
var diffphase = phase - FMlastphase; var diffphase = phase - FMlastphase;
this.lastphase = phase; FMlastphase = phase;
if( diffphase < 0.0 ) diffphase += 1.0; if( diffphase - FMiirphase < 0.0 ) diffphase += 1.0;
if( diffphase > 1.0 ) diffphase -= 1.0; if( diffphase - FMiirphase > 1.0 ) diffphase -= 1.0;
FMiirphase = FMiirphase * 0.999 + diffphase * 0.001; FMiirphase = FMiirphase * 0.999 + diffphase * 0.001;
diffphase -= FMiirphase; diffphase -= FMiirphase;
if( diffphase > 0.5 ) diffphase -= 1;
if( diffphase <-0.5 ) diffphase += 1;
var po = FMphaseout = FMphaseout * 0.993 + diffphase; var po = FMphaseout = FMphaseout * 0.993 + diffphase;
if( po < 0.0 ) po += 1.0; if( po < 0.0 ) po += 1.0;
if( po > 1.0 ) po -= 1.0; if( po > 1.0 ) po -= 1.0;