feat: add clipper node
This commit is contained in:
parent
229b3eb1e2
commit
77c4851119
3 changed files with 39 additions and 1 deletions
22
core/Clipper.hpp
Normal file
22
core/Clipper.hpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue