mirror of https://github.com/probonopd/MiniDexed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.2 KiB
44 lines
1.2 KiB
12 months ago
|
#ifndef _EFFECT_BASE_H
|
||
|
#define _EFFECT_BASE_H
|
||
12 months ago
|
|
||
12 months ago
|
//#include <stdint.h>
|
||
12 months ago
|
#include <arm_math.h>
|
||
|
|
||
|
#define EFFECT_NONE 0
|
||
|
#define EFFECT_CHORUS 1
|
||
|
#define EFFECT_DELAY 2
|
||
|
|
||
|
class AudioEffect
|
||
|
{
|
||
|
public:
|
||
|
AudioEffect(float32_t samplerate);
|
||
|
virtual ~AudioEffect();
|
||
|
|
||
|
void setBypass(bool bypass);
|
||
|
bool getBypass();
|
||
|
|
||
|
virtual unsigned getId();
|
||
12 months ago
|
//virtual void setParameter(unsigned param, unsigned value);
|
||
|
//virtual void getParameter(unsigned param);
|
||
12 months ago
|
|
||
12 months ago
|
void process(const float32_t* inblockL, float32_t* outblockL, uint16_t len);
|
||
12 months ago
|
void process(const float32_t* inblockL, const float32_t* inblockR, float32_t* outblockL, float32_t* outblockR, uint16_t len);
|
||
|
protected:
|
||
|
bool bypass = false;
|
||
|
float32_t samplerate;
|
||
|
|
||
|
virtual void doProcess(const float32_t* inblockL, const float32_t* inblockR, float32_t* outblockL, float32_t* outblockR, uint16_t len);
|
||
|
};
|
||
|
|
||
|
class AudioEffectNone : public AudioEffect
|
||
|
{
|
||
|
public:
|
||
|
AudioEffectNone(float32_t samplerate);
|
||
|
virtual ~AudioEffectNone();
|
||
|
|
||
|
virtual unsigned getId();
|
||
|
protected:
|
||
|
virtual void doProcess(const float32_t* inblockL, const float32_t* inblockR, float32_t* outblockL, float32_t* outblockR, uint16_t len);
|
||
|
};
|
||
|
|
||
12 months ago
|
#endif // _EFFECT_BASE_H
|