feat: add clipper node

This commit is contained in:
Liam Kerr 2026-08-02 20:03:04 +01:00
parent 229b3eb1e2
commit 77c4851119
3 changed files with 39 additions and 1 deletions

22
core/Clipper.hpp Normal file
View file

@ -0,0 +1,22 @@
#ifndef CLIPPER_HPP_INCLUDED
#define CLIPPER_HPP_INCLUDED
#include <cstdint>
class Clipper {
public:
Clipper(float init_clip = 1.0f);
void process(const float *in, float *out, uint32_t frames);
void processStereo(const float *inLeft, const float *inRight, float *outLeft,
float *outRight, uint32_t frames);
private:
float clip_;
public:
void setGain(float c) { clip_ = c; }
float getGain() const { return clip_; }
};
#endif // CLIPPER_HPP_INCLUDED