aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/LV2/src/Average
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LV2/src/Average')
-rw-r--r--plugins/LV2/src/Average/Average.cpp12
-rw-r--r--plugins/LV2/src/Average/Average.h1
2 files changed, 13 insertions, 0 deletions
diff --git a/plugins/LV2/src/Average/Average.cpp b/plugins/LV2/src/Average/Average.cpp
index 5155b16..b485576 100644
--- a/plugins/LV2/src/Average/Average.cpp
+++ b/plugins/LV2/src/Average/Average.cpp
@@ -7,6 +7,18 @@ Average::Average(double rate)
{
}
+void Average::activate()
+{
+ for(int count = 0; count < 11; count++) {
+ bL[count] = 0.0;
+ bR[count] = 0.0;
+ f[count] = 0.0;
+ }
+
+ fpNShapeL = 0.0;
+ fpNShapeR = 0.0;
+}
+
void Average::run(uint32_t num_samples)
{
A = *params[0];
diff --git a/plugins/LV2/src/Average/Average.h b/plugins/LV2/src/Average/Average.h
index e7bc673..9c35897 100644
--- a/plugins/LV2/src/Average/Average.h
+++ b/plugins/LV2/src/Average/Average.h
@@ -7,6 +7,7 @@ class Average : public LV2Plugin<2> {
public:
Average(double rate);
+ void activate() override;
void run(uint32_t num_samples);
static constexpr const char * URI = "https://www.airwindows.com/average";