2022-09-13 02:14:03 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
|
2022-09-18 03:38:22 +02:00
|
|
|
class FIREqualizer {
|
2022-09-13 02:14:03 +02:00
|
|
|
public:
|
2022-09-18 03:38:22 +02:00
|
|
|
FIREqualizer(uint32_t channels, uint32_t length);
|
|
|
|
~FIREqualizer();
|
2022-09-13 02:14:03 +02:00
|
|
|
|
|
|
|
void FlushBuffer();
|
2022-09-16 03:16:58 +02:00
|
|
|
uint32_t GetBufferLength() const;
|
|
|
|
uint32_t GetBufferOffset() const;
|
|
|
|
float *GetBufferPointer() const;
|
|
|
|
uint32_t GetChannels() const;
|
2022-09-13 02:14:03 +02:00
|
|
|
void PanFrames(float left, float right);
|
|
|
|
int PopFrames(float *frames, uint32_t length);
|
2022-09-16 03:16:58 +02:00
|
|
|
int PushFrames(const float *frames, uint32_t length);
|
2022-09-13 02:14:03 +02:00
|
|
|
int PushZero(uint32_t length);
|
|
|
|
void ScaleFrames(float scale);
|
|
|
|
void SetBufferOffset(uint32_t offset);
|
|
|
|
|
2022-09-13 02:16:31 +02:00
|
|
|
private:
|
2022-09-13 02:14:03 +02:00
|
|
|
float *buffer;
|
|
|
|
uint32_t length;
|
|
|
|
uint32_t offset;
|
|
|
|
uint32_t channels;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|