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
+22
View File
@@ -0,0 +1,22 @@
#pragma once
#include <math.h>
typedef struct {
float targetLevel;
float maxGain;
float minGain;
float attackTime;
float releaseTime;
float currentGain;
float currentLevel;
int sampleRate;
float attackCoef;
float releaseCoef;
float rms_buffer;
} AGC;
void initAGC(AGC* agc, int sampleRate, float targetLevel, float minGain, float maxGain, float attackTime, float releaseTime);
float process_agc_stereo(AGC* agc, float left, float right, float *right_out);