-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly Handle mismatch between Presets and EffectUnits with different amount of Effect slots #11424
Conversation
src/effects/effectchain.cpp
Outdated
const std::size_t validPresetSlotCount = std::min(effectPresets.count(), m_effectSlots.count()); | ||
for (std::size_t presetSlotIndex = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QT uses int for sized from Qt6 it is qsizetype which is ssize_t
const std::size_t validPresetSlotCount = std::min(effectPresets.count(), m_effectSlots.count()); | |
for (std::size_t presetSlotIndex = 0; | |
const int validPresetSlotCount = std::min(effectPresets.count(), m_effectSlots.count()); | |
for (int presetSlotIndex = 0; |
This avoids a warning in MSVC
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/effects/effectchain.cpp
Outdated
const QList effectPresets = pChainPreset->effectPresets(); | ||
|
||
// TODO: use C++23 std::ranges::views::zip instead | ||
const std::size_t validPresetSlotCount = std::min(effectPresets.count(), m_effectSlots.count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment about why the case effectPresets.count() != m_effectSlots.count() can happen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
fyi, ping me before merging so I can autosquash the fixup commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. LGTM.
Yust ping me if you are satisfied with the git history.
Only load effect preset from chain presets to slots that actually have been created. The rest gets ignored.
@daschuer ready |
@daschuer friendly ping |
Oh, sorry this slipped through. |
No worries 👍 |
Fixes #11376
However, it does not address the question whether the EQ should be implemented in terms of an EffectChain