Fix stuck notes on notestacking

Fixes #865. Added a check so we don't add subnotes to a note that is already released (can happen with very short midinotes, eg. sliding the mouse accross the gui piano).
I also added a mutex to incoming midievent handling in instrumenttrack. Not sure if strictly necessary, but seems like this would prevent problems in the long run.
Also fixed a glitch in noteplayhandle where silent master notes got stuck playing indefinitely ( isMasternote() returns true even if the nph just hadChildren, so it never gets ended if it did - instead we check if we still have subnotes).
This commit is contained in:
Vesa
2014-06-19 00:30:48 +03:00
parent 4ef5b5fef3
commit 0f03219c93
4 changed files with 6 additions and 5 deletions

View File

@@ -230,6 +230,7 @@ private:
NotePlayHandle* m_notes[NumKeys];
int m_runningMidiNotes[NumKeys];
bool m_sustainPedalPressed;
QMutex m_notesMutex;
bool m_silentBuffersProcessed;