NotePlayHandle: stop properly when arpeggio is played via MIDI

If a note is played via MIDI (e.g. with infinite frame count) and arpeggio
is enabled the NotePlayHandle never got deleted as framesLeft() always
returned a big value even after release.

Closes #169.
This commit is contained in:
Tobias Doerffel
2014-01-26 19:09:11 +01:00
parent 4b340f7d5f
commit 09395a2f3e

View File

@@ -305,9 +305,10 @@ void notePlayHandle::play( sampleFrame * _working_buffer )
// can set m_releaseFramesDone to m_releaseFramesToDo so that
// notePlayHandle::done() returns true and also this base-note is
// removed from mixer's active note vector
if( isArpeggioBaseNote() && m_subNotes.size() == 0 )
if( m_released && isArpeggioBaseNote() && m_subNotes.size() == 0 )
{
m_releaseFramesDone = m_releaseFramesToDo;
m_frames = 0;
}
// update internal data