Sorted the proper array
The wrong array was sorted when trying to find a voice to steal
This commit is contained in:
parent
a59734f000
commit
8941f0a800
1 changed files with 1 additions and 1 deletions
|
|
@ -348,7 +348,7 @@ sfz::Voice* sfz::Synth::findFreeVoice() noexcept
|
|||
for (auto& voice : voices)
|
||||
if (voice->canBeStolen())
|
||||
voiceViewArray.push_back(voice.get());
|
||||
absl::c_sort(voices, [](const auto& lhs, const auto& rhs) { return lhs->getSourcePosition() > rhs->getSourcePosition(); });
|
||||
absl::c_sort(voiceViewArray, [](const auto& lhs, const auto& rhs) { return lhs->getSourcePosition() > rhs->getSourcePosition(); });
|
||||
|
||||
for (auto* voice : voiceViewArray) {
|
||||
if (voice->getMeanSquaredAverage() < config::voiceStealingThreshold) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue