Skip to content

Commit 7855e55

Browse files
committed
fix fm
1 parent 8511ccc commit 7855e55

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/constants.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef _FAS_CONSTANTS_H_
22
#define _FAS_CONSTANTS_H_
33

4-
#define linearInterpolate(y1, y2, mu) (y1 * (1-mu) + y2 * mu)
5-
64
#ifndef M_PI
75
#define M_PI (3.141592653589)
86
#endif

src/main.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1845,12 +1845,10 @@ static int audioCallback(float **inputBuffer, float **outputBuffer, unsigned lon
18451845
double dummy_int_part;
18461846

18471847
if ((n->previous_volume_l <= 0 && n->previous_volume_r <= 0) || trigger_note_on) {
1848-
resetOscillator(osc, k);
1849-
18501848
osc->pvalue[k] = 0;
18511849

1852-
osc->fp3[k][0] = modf(fabs(n->blue), &dummy_int_part);
1853-
osc->fp4[k][0] = floor(fabs(n->blue)) / 65536.0;
1850+
osc->fp3[k][0] = modf(fabs(n->pblue), &dummy_int_part);
1851+
osc->fp4[k][0] = floor(fabs(n->pblue)) / 65536.0;
18541852
osc->fp4[k][3] = osc->fp4[k][2];
18551853
}
18561854

@@ -1888,6 +1886,10 @@ static int audioCallback(float **inputBuffer, float **outputBuffer, unsigned lon
18881886
osc->fp2[k][1] = fas_wavetable_size;
18891887
}
18901888

1889+
if ((n->previous_volume_l <= 0 && n->previous_volume_r <= 0) || trigger_note_on) {
1890+
osc->fp4[k][3] = osc->fp4[k][2];
1891+
}
1892+
18911893
osc->fp3[k][1] = osc->fp3[k][0];
18921894
osc->fp3[k][0] = modf(fabs(n->blue), &dummy_int_part);
18931895

0 commit comments

Comments
 (0)