summaryrefslogtreecommitdiff
path: root/synth/envelope.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2011-01-12 12:06:35 +0100
committerFlorian Jung <flo@thinkpad.(none)>2011-01-12 12:06:35 +0100
commit105932305adf830ec8116827761a8a8c8aff4523 (patch)
tree6449fe3fc06bf438d10539c59c3de6cac2d3ec6c /synth/envelope.cpp
parent528902f28af1bb430ba7c7f1bf4ebbc54fb7aaf6 (diff)
Non-releasing Envelopes now work
Diffstat (limited to 'synth/envelope.cpp')
-rw-r--r--synth/envelope.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/synth/envelope.cpp b/synth/envelope.cpp
index 5678fd3..2f06a4e 100644
--- a/synth/envelope.cpp
+++ b/synth/envelope.cpp
@@ -1,7 +1,5 @@
#include "envelope.h"
-#include <iostream>
-
Envelope::Envelope(env_settings_t s, int frames)
{
level=0;
@@ -14,6 +12,9 @@ Envelope::Envelope(env_settings_t s, int frames)
set_ratefactor(1.0);
has_release_phase=(s.release>=0);
+
+ if (has_release_phase)
+ s.hold=false;
set_attack(s.attack);
set_decay(s.decay);