Skip to content

Commit

Permalink
fix PAULA button enable/disable
Browse files Browse the repository at this point in the history
  • Loading branch information
astriiddev authored Apr 21, 2024
1 parent f7c70a4 commit 7c8ffc7
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions Source/GuiComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,16 @@ void GuiComponent::buttonClicked(juce::Button *button)
}
audioProcessor.setSolo(currentSample, !audioProcessor.isSoloed(currentSample));
};

if(button == &monoBox)
{
audioProcessor.setMonoPoly(currentSample, 1);

if(audioProcessor.paulaStereoOn(currentSample))
paulaStereo.setToggleState(false, juce::NotificationType::sendNotification);

paulaStereo.setEnabled(false);
}
}

void GuiComponent::parameterChanged(const juce::String &parameterID, float newValue)
Expand Down Expand Up @@ -668,14 +678,8 @@ void GuiComponent::initAllCheckboxes()

initCheckBox(&enableAscii2Note, "Enabled", -1);

monoBox.onClick = [&]
{
audioProcessor.setMonoPoly(currentSample, 1);
if(audioProcessor.paulaStereoOn(currentSample)) paulaStereo.triggerClick();
};

ptpolyBox.onClick = [&] { audioProcessor.setMonoPoly(currentSample, 2); };
octapolyBox.onClick = [&] { audioProcessor.setMonoPoly(currentSample, 3); };
ptpolyBox.onClick = [&] { audioProcessor.setMonoPoly(currentSample, 2); paulaStereo.setEnabled(true); };
octapolyBox.onClick = [&] { audioProcessor.setMonoPoly(currentSample, 3); paulaStereo.setEnabled(true); };

ledFilter.onClick = [&] { repaint(ledRectangle); };

Expand Down

0 comments on commit 7c8ffc7

Please sign in to comment.