v1.3.56 - Midi bindings crash

This commit is contained in:
Robin Davies
2024-10-11 10:29:43 -04:00
parent 50fdd86639
commit 21f5c9e43a
9 changed files with 32 additions and 13 deletions
+14
View File
@@ -73,6 +73,20 @@ public:
result.symbol_ = symbol;
return result;
}
bool operator==(const MidiBinding&other) const
{
return this->symbol_ == other.symbol_
&& this->channel_ == other.channel_
&& this->bindingType_ == other.bindingType_
&& this->note_ == other.note_
&& this->control_ == other.control_
&& this->minValue_ == other.minValue_
&& this->maxValue_ == other.maxValue_
&& this->rotaryScale_ == other.rotaryScale_
&& this->linearControlType_ == other.linearControlType_
&& this->switchControlType_ == other.switchControlType_;
}
GETTER_SETTER(channel);
GETTER_SETTER_REF(symbol);
GETTER_SETTER(bindingType);
+4
View File
@@ -327,6 +327,10 @@ bool PedalboardItem::IsStructurallyIdentical(const PedalboardItem&other) const
{
return false;
}
if (this->midiBindings() != other.midiBindings())
{
return false;
}
if (this->isSplit()) // so is the other by virtue of idential uris.
{
// provisionally, it seems ok to change the split type.
+1 -1
View File
@@ -1485,7 +1485,7 @@ void PiPedalModel::OnNotifyMidiValueChanged(int64_t instanceId, int portIndex, f
std::vector<IPiPedalModelSubscriber::ptr> t{subscribers.begin(), subscribers.end()};
for (auto &subscriber : t)
{
t[i]->OnMidiValueChanged(instanceId, symbol, value);
subscriber->OnMidiValueChanged(instanceId, symbol, value);
}
this->SetPresetChanged(-1, true);