optimize or just clean up

This commit is contained in:
2025-06-09 20:13:43 +02:00
parent cad6080c07
commit 334688b785
7 changed files with 13 additions and 35 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ void init_preemphasis(ResistorCapacitor *filter, float tau, float sample_rate, f
float dt = 1.0f / sample_rate;
filter->alpha = tau / (tau + dt);
float omega = 2.0f * M_PI * ref_freq / sample_rate;
float omega = M_2PI * ref_freq / sample_rate;
float cos_omega = cosf(omega);
float numerator = sqrtf(1.0f + filter->alpha * filter->alpha - 2.0f * filter->alpha * cos_omega);