mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-30 16:29:15 +02:00
optimize or just clean up
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user