diff options
author | rekado <rekado@elephly.net> | 2013-01-16 20:16:32 +0800 |
---|---|---|
committer | rekado <rekado@elephly.net> | 2013-01-16 20:16:32 +0800 |
commit | 88daa8a6cff065dad9a399928b9f2aa21081a066 (patch) | |
tree | d3851b9d99feb7025c9bd68be6d3c39c4c851199 | |
parent | 53c71937b7106e8606edf5564c415a8213b6efea (diff) |
set m_key to INVALID_KEY when silent
-rw-r--r-- | src/mdaPianoVoice.cpp | 5 |
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; + } } |