summaryrefslogtreecommitdiffstats
path: root/src/engine/effects
diff options
context:
space:
mode:
authorbe_ <be.0@gmx.com>2017-12-15 16:23:23 -0600
committerbe_ <be.0@gmx.com>2017-12-15 16:23:23 -0600
commitc53c58173c28c8a88263f01177b43fdcf6c55fd5 (patch)
tree51c2c4b3645e9ac965b8528a613ad8142eb29823 /src/engine/effects
parent33405b2227a3a04f4909981fcda6b09787b821b1 (diff)
guard qDebug output in engine thread with kEffectDebugOutput bool
emitting debugging output from the engine output can cause audio dropouts
Diffstat (limited to 'src/engine/effects')
-rw-r--r--src/engine/effects/engineeffect.cpp5
-rw-r--r--src/engine/effects/engineeffectchain.cpp13
2 files changed, 11 insertions, 7 deletions
diff --git a/src/engine/effects/engineeffect.cpp b/src/engine/effects/engineeffect.cpp
index 36cc6f0f1b..063d12884b 100644
--- a/src/engine/effects/engineeffect.cpp
+++ b/src/engine/effects/engineeffect.cpp
@@ -62,7 +62,10 @@ EffectState* EngineEffect::createState(const mixxx::EngineParameters& bufferPara
void EngineEffect::loadStatesForInputChannel(const ChannelHandle& inputChannel,
const EffectStatesPointer states) {
- qDebug() << "EngineEffect::loadStatesForInputChannel" << this << "loading states for input" << inputChannel;
+ if (kEffectDebugOutput) {
+ qDebug() << "EngineEffect::loadStatesForInputChannel" << this
+ << "loading states for input" << inputChannel;
+ }
m_pProcessor->loadStatesForInputChannel(inputChannel, states);
}
diff --git a/src/engine/effects/engineeffectchain.cpp b/src/engine/effects/engineeffectchain.cpp
index c890a02abe..a0ecba3d96 100644
--- a/src/engine/effects/engineeffectchain.cpp
+++ b/src/engine/effects/engineeffectchain.cpp
@@ -143,20 +143,21 @@ bool EngineEffectChain::processEffectsRequest(const EffectsRequest& message,
bool EngineEffectChain::enableForInputChannel(const ChannelHandle& inputHandle,
const QList<EffectStatesPointer>* statesForEffectsInChain) {
- qDebug() << "EngineEffectChain::enableForInputChannel" << this << inputHandle;
+ if (kEffectDebugOutput) {
+ qDebug() << "EngineEffectChain::enableForInputChannel" << this << inputHandle;
+ }
auto& outputMap = m_chainStatusForChannelMatrix[inputHandle];
for (auto&& outputChannelStatus : outputMap) {
if (outputChannelStatus.enable_state != EffectEnableState::Enabled) {
outputChannelStatus.enable_state = EffectEnableState::Enabling;
}
}
-// VERIFY_OR_DEBUG_ASSERT(m_effects.size() > 0) {
-// return false;
-// }
for (int i = 0; i < m_effects.size(); ++i) {
if (m_effects[i] != nullptr) {
- qDebug() << "EngineEffectChain::enableForInputChannel" << this
- << "loading states for effect" << i;
+ if (kEffectDebugOutput) {
+ qDebug() << "EngineEffectChain::enableForInputChannel" << this
+ << "loading states for effect" << i;
+ }
EffectStatesPointer pStates = statesForEffectsInChain->at(i);
VERIFY_OR_DEBUG_ASSERT(pStates != nullptr) {
return false;