summaryrefslogtreecommitdiffstats
path: root/src/effects/effectchainslot.cpp
diff options
context:
space:
mode:
authorBe <be@mixxx.org>2020-04-03 10:59:49 -0500
committerBe <be@mixxx.org>2020-04-03 10:59:49 -0500
commitc8367b14c5c69f87e78ff75ca5c9d9b1af9132ca (patch)
tree7dd75d91ef6b982c555868df3dda615b0f053d93 /src/effects/effectchainslot.cpp
parentc9e81ea9cd922dffcb9f461626e759a4290e3bd4 (diff)
reimplement loading of effects.xml with new preset classes
with support for rearranging parameters by rearranging them in the XML and hiding parameters by adding a <Hidden> element to the parameter element
Diffstat (limited to 'src/effects/effectchainslot.cpp')
-rw-r--r--src/effects/effectchainslot.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/effects/effectchainslot.cpp b/src/effects/effectchainslot.cpp
index 8572b60400..5c0ddf0ae2 100644
--- a/src/effects/effectchainslot.cpp
+++ b/src/effects/effectchainslot.cpp
@@ -186,10 +186,10 @@ void EffectChainSlot::setDescription(const QString& description) {
}
void EffectChainSlot::loadEffect(const unsigned int iEffectSlotNumber,
- const EffectManifestPointer pManifest,
- std::unique_ptr<EffectProcessor> pProcessor) {
- m_effectSlots[iEffectSlotNumber]->loadEffect(pManifest, std::move(pProcessor),
- m_enabledInputChannels);
+ const EffectManifestPointer pManifest,
+ std::unique_ptr<EffectProcessor> pProcessor,
+ EffectPresetPointer pPreset) {
+ m_effectSlots[iEffectSlotNumber]->loadEffect(pManifest, std::move(pProcessor), pPreset, m_enabledInputChannels);
}
void EffectChainSlot::sendParameterUpdate() {
@@ -224,8 +224,15 @@ void EffectChainSlot::setSuperParameterDefaultValue(double value) {
m_pControlChainSuperParameter->setDefaultValue(value);
}
+void EffectChainSlot::setMixMode(EffectChainMixMode mixMode) {
+ m_pControlChainMixMode->set(static_cast<int>(mixMode));
+ sendParameterUpdate();
+}
+
EffectSlotPointer EffectChainSlot::addEffectSlot(const QString& group) {
- // qDebug() << debugString() << "addEffectSlot" << group;
+ if (kEffectDebugOutput) {
+ qDebug() << debugString() << "addEffectSlot" << group;
+ }
EffectSlotPointer pEffectSlot = EffectSlotPointer(
new EffectSlot(group, m_pEffectsManager, m_effectSlots.size(), m_pEngineEffectChain));
@@ -262,8 +269,7 @@ void EffectChainSlot::registerInputChannel(const ChannelHandleAndGroup& handle_g
EffectSlotPointer EffectChainSlot::getEffectSlot(unsigned int slotNumber) {
//qDebug() << debugString() << "getEffectSlot" << slotNumber;
- if (slotNumber >= static_cast<unsigned int>(m_effectSlots.size())) {
- qWarning() << "WARNING: slotNumber out of range";
+ VERIFY_OR_DEBUG_ASSERT(slotNumber <= static_cast<unsigned int>(m_effectSlots.size())) {
return EffectSlotPointer();
}
return m_effectSlots[slotNumber];