sample rate

This commit is contained in:
Dimas Leenman 2022-07-20 14:06:14 +02:00
parent acc933add3
commit 505662414a

View file

@ -105,7 +105,8 @@ impl DspNode for Formant {
let wave = carrier * modulator; let wave = carrier * modulator;
// increment phase (very imporant) // increment phase (very imporant)
self.phase += self.inv_sample_rate; self.phase += base_freq * self.inv_sample_rate;
self.phase = self.phase.fract();
out.write(frame, wave); out.write(frame, wave);
} }