fix: remove adsr garbage code

This commit is contained in:
2023-09-08 17:17:23 +04:00
parent 1cf3cccb69
commit 576cf8e3b5
2 changed files with 18 additions and 26 deletions

View File

@@ -3,18 +3,14 @@
#include "Ramp.h"
#include <cstddef>
struct ADSRParameters {
float attack_time; // Attack time in seconds
float decay_time; // Decay time in seconds
float sustain_level; // Sustain level (0 to 1)
float release_time;
};
enum ADSRState { sOff, sAttack, sDecay, sSustain, sRelease };
class ADSR : public Effect {
enum ADSRState { sOff, sAttack, sDecay, sSustain, sRelease };
private:
ADSRParameters m_parameters;
float m_attack_time;
float m_decay_time;
float m_sustain_level;
float m_release_time;
ADSRState m_state;
Ramp* m_ramp;
@@ -26,7 +22,6 @@ class ADSR : public Effect {
public:
ADSR(/* args */);
ADSR(ADSRParameters param);
~ADSR();
void Trigger() override;
void Release() override;