0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00
This commit is contained in:
2025-04-19 13:04:07 +02:00
parent 702ee8922b
commit 4564bbf737
8 changed files with 107 additions and 45 deletions

View File

@@ -23,15 +23,15 @@ float get_oscillator_cos_sample(Oscillator *osc) {
}
float get_oscillator_sin_multiplier_ni(Oscillator *osc, float multiplier) {
float new_phase = osc->phase * multiplier;
new_phase -= (new_phase >= M_2PI) ? M_2PI : 0.0f;
return sinf(new_phase);
float new_phase = osc->phase * multiplier;
new_phase -= (new_phase >= M_2PI) ? M_2PI : 0.0f;
return sinf(new_phase);
}
float get_oscillator_cos_multiplier_ni(Oscillator *osc, float multiplier) {
float new_phase = osc->phase * multiplier;
new_phase -= (new_phase >= M_2PI) ? M_2PI : 0.0f;
return cosf(new_phase);
new_phase -= (new_phase >= M_2PI) ? M_2PI : 0.0f;
return cosf(new_phase);
}
void advance_oscillator(Oscillator *osc) {