diff options
author | RJ Ryan <rryan@mixxx.org> | 2013-12-01 14:18:42 -0500 |
---|---|---|
committer | RJ Ryan <rryan@mixxx.org> | 2013-12-01 14:18:42 -0500 |
commit | 2f0afa49854ee05b73255f26ef534aeda573f87b (patch) | |
tree | 8783560b2464be82fde0f230a0170765813b8b5e /src/effects/effectchainmanager.cpp | |
parent | 25fa5ac61734eb21aa49c7ab41565db7ad50e9c3 (diff) |
Fix goofy initialization order requirements for EffectChains by making them send all their existing state right after being added to the engine.
Diffstat (limited to 'src/effects/effectchainmanager.cpp')
-rw-r--r-- | src/effects/effectchainmanager.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/effects/effectchainmanager.cpp b/src/effects/effectchainmanager.cpp index 07476705b7..2ff4e09543 100644 --- a/src/effects/effectchainmanager.cpp +++ b/src/effects/effectchainmanager.cpp @@ -15,11 +15,14 @@ EffectChainManager::~EffectChainManager() { void EffectChainManager::addEffectChain(EffectChainPointer pEffectChain) { if (pEffectChain) { m_effectChains.append(pEffectChain); - EffectsRequest* pRequest = new EffectsRequest(); - pRequest->type = EffectsRequest::ADD_EFFECT_CHAIN; - pRequest->AddEffectChain.pChain = pEffectChain->getEngineEffectChain(); - m_pEffectsManager->writeRequest(pRequest); + pEffectChain->addToEngine(); + } +} +void EffectChainManager::removeEffectChain(EffectChainPointer pEffectChain) { + if (pEffectChain) { + m_effectChains.removeAll(pEffectChain); + pEffectChain->removeFromEngine(); } } |