Mercurial > hg > silvet
comparison src/Silvet.cpp @ 364:78ed74fa177b
Fix crash in finetune mode sometimes caused by note remaining on while column falls below threshold
author | Chris Cannam |
---|---|
date | Wed, 07 Oct 2015 16:47:31 +0100 |
parents | 0af00da90a40 |
children |
comparison
equal
deleted
inserted
replaced
362:fff8f6d2d2a3 | 364:78ed74fa177b |
---|---|
1018 int j = si->second; | 1018 int j = si->second; |
1019 | 1019 |
1020 active[j] = strength; | 1020 active[j] = strength; |
1021 | 1021 |
1022 if (shiftCount > 1) { | 1022 if (shiftCount > 1) { |
1023 activeShifts[j] = bestShifts[j]; | 1023 if (!bestShifts.empty()) { |
1024 activeShifts[j] = bestShifts[j]; | |
1025 } else { | |
1026 // can happen if column was below threshold | |
1027 activeShifts[j] = 0; | |
1028 } | |
1024 } | 1029 } |
1025 } | 1030 } |
1026 | 1031 |
1027 m_pianoRoll.push_back(active); | 1032 m_pianoRoll.push_back(active); |
1028 | 1033 |