Skip to content

Commit

Permalink
Some fixes when switching legato or reordering grup letago (#1462)
Browse files Browse the repository at this point in the history
there was a bug in VM basically which made the legato application
order of group dependent in one case. Fix that and also make sure
that swithcing to poly actually switches us to poly (which wasnt that
bug but could have been)
  • Loading branch information
baconpaul authored Nov 24, 2024
1 parent 6ccc3bf commit 349b3c1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/engine/engine_voice_responder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ void Engine::VoiceManagerResponder::setPolyphonicAftertouch(voice::Voice *v, int

void Engine::VoiceManagerResponder::terminateVoice(voice::Voice *v)
{
SCLOG_IF(voiceResponder, "terminateVoice " << v << " " << (int)v->key);
;
if (!v->isVoicePlaying)
return;
if (v->isGated)
Expand Down
6 changes: 6 additions & 0 deletions src/engine/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,16 @@ void Group::resetPolyAndPlaymode(engine::Engine &e)
}
else
{
auto pgrp = (uint64_t)this;
SCLOG_IF(voiceResponder, "Setting up poly group " << pgrp);

e.voiceManager.setPlaymode(pgrp, Engine::voiceManager_t::PlayMode::POLY_VOICES,
outputInfo.vmPlayModeFeaturesInt);
assert(outputInfo.vmPlayModeInt == (uint32_t)Engine::voiceManager_t::PlayMode::POLY_VOICES);
if (!outputInfo.hasIndependentPolyLimit)
{
// TODO we really want a 'clear'
e.voiceManager.setPolyphonyGroupVoiceLimit((uint64_t)this, maxVoices);
}
else
{
Expand Down

0 comments on commit 349b3c1

Please sign in to comment.