add some standards

This commit is contained in:
2026-07-12 22:16:56 +02:00
parent baca631ffb
commit fa6f69077b
9 changed files with 14 additions and 7 deletions
-2
View File
@@ -2,7 +2,6 @@
void init_oscillator(Oscillator *osc, float frequency, float sample_rate) {
osc->phase = 0.0f;
osc->unwrapped_phase = 0.0;
osc->phase_increment = (M_2PI * frequency) / sample_rate;
osc->sample_rate = sample_rate;
}
@@ -33,7 +32,6 @@ float get_oscillator_cos_multiplier_ni(Oscillator *osc, float multiplier) {
inline bool advance_oscillator(Oscillator *osc) {
osc->phase += osc->phase_increment;
osc->unwrapped_phase += osc->phase_increment;
if (osc->phase >= M_2PI) {
osc->phase -= M_2PI;
return true;
-1
View File
@@ -6,7 +6,6 @@
typedef struct {
float phase;
double unwrapped_phase;
float phase_increment;
float sample_rate;
} Oscillator;