implement new audio engine

This commit is contained in:
2026-06-05 20:30:12 +02:00
parent 16efeb2fde
commit 61eb9a8be5
24 changed files with 1021 additions and 440 deletions
+37
View File
@@ -0,0 +1,37 @@
#pragma once
#include <array>
#include "AudioBuffer.h"
namespace engine {
class EqProcessor {
public:
static constexpr int BANDS = 10;
static constexpr float FREQS[BANDS] = {
32, 64, 125, 250, 500, 1000, 2000, 4000, 8000, 16000
};
EqProcessor();
void setBand(int band, float dB);
float band(int band) const;
void process(AudioBuffer &buf);
void reset();
void setSampleRate(int sr);
private:
void recomputeBiquad(int band);
int m_sampleRate { 44100 };
float m_gainDb[BANDS] {};
float m_coeff[BANDS][5] {};
static constexpr int MAX_CH = 8;
float m_state[BANDS][MAX_CH][2] {};
};
} // namespace engine