summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-01-16 20:16:32 +0800
committerrekado <rekado@elephly.net>2013-01-16 20:16:32 +0800
commit88daa8a6cff065dad9a399928b9f2aa21081a066 (patch)
treed3851b9d99feb7025c9bd68be6d3c39c4c851199 /src
parent53c71937b7106e8606edf5564c415a8213b6efea (diff)
set m_key to INVALID_KEY when silent
Diffstat (limited to 'src')
-rw-r--r--src/mdaPianoVoice.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mdaPianoVoice.cpp b/src/mdaPianoVoice.cpp
index 00198fd..9f75839 100644
--- a/src/mdaPianoVoice.cpp
+++ b/src/mdaPianoVoice.cpp
@@ -200,6 +200,11 @@ r = 0.0f;
p(p_left)[frame] += l + x;
p(p_right)[frame] += r - x;
}
+
+ // turn off further processing when the envelope has rendered the voice silent
+ if (env < SILENCE) {
+ m_key = LV2::INVALID_KEY;
+ }
}