Skip to content

Commit

Permalink
Merge pull request mixxxdj#1674 from kshitij98/effect_blacklisting
Browse files Browse the repository at this point in the history
Effect Blacklisting
  • Loading branch information
ronso0 authored and GitHub committed May 29, 2018
2 parents a427063 + 01c73e2 commit 3e96599
Show file tree
Hide file tree
Showing 85 changed files with 668 additions and 350 deletions.
41 changes: 21 additions & 20 deletions build/depends.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ def sources(self, build):
"preferences/broadcastsettings.cpp",
"preferences/broadcastsettings_legacy.cpp",
"preferences/broadcastsettingsmodel.cpp",
"preferences/effectsettingsmodel.cpp",
"preferences/broadcastprofile.cpp",
"preferences/upgrade.cpp",
"preferences/dlgpreferencepage.cpp",
Expand All @@ -769,26 +770,26 @@ def sources(self, build):
"effects/effectchainmanager.cpp",
"effects/effectsbackend.cpp",

"effects/native/nativebackend.cpp",
"effects/native/bitcrushereffect.cpp",
"effects/native/balanceeffect.cpp",
"effects/native/linkwitzriley8eqeffect.cpp",
"effects/native/bessel4lvmixeqeffect.cpp",
"effects/native/bessel8lvmixeqeffect.cpp",
"effects/native/threebandbiquadeqeffect.cpp",
"effects/native/biquadfullkilleqeffect.cpp",
"effects/native/loudnesscontoureffect.cpp",
"effects/native/graphiceqeffect.cpp",
"effects/native/parametriceqeffect.cpp",
"effects/native/flangereffect.cpp",
"effects/native/filtereffect.cpp",
"effects/native/moogladder4filtereffect.cpp",
"effects/native/reverbeffect.cpp",
"effects/native/echoeffect.cpp",
"effects/native/autopaneffect.cpp",
"effects/native/phasereffect.cpp",
"effects/native/metronomeeffect.cpp",
"effects/native/tremoloeffect.cpp",
"effects/builtin/builtinbackend.cpp",
"effects/builtin/bitcrushereffect.cpp",
"effects/builtin/balanceeffect.cpp",
"effects/builtin/linkwitzriley8eqeffect.cpp",
"effects/builtin/bessel4lvmixeqeffect.cpp",
"effects/builtin/bessel8lvmixeqeffect.cpp",
"effects/builtin/threebandbiquadeqeffect.cpp",
"effects/builtin/biquadfullkilleqeffect.cpp",
"effects/builtin/loudnesscontoureffect.cpp",
"effects/builtin/graphiceqeffect.cpp",
"effects/builtin/parametriceqeffect.cpp",
"effects/builtin/flangereffect.cpp",
"effects/builtin/filtereffect.cpp",
"effects/builtin/moogladder4filtereffect.cpp",
"effects/builtin/reverbeffect.cpp",
"effects/builtin/echoeffect.cpp",
"effects/builtin/autopaneffect.cpp",
"effects/builtin/phasereffect.cpp",
"effects/builtin/metronomeeffect.cpp",
"effects/builtin/tremoloeffect.cpp",

"engine/effects/engineeffectsmanager.cpp",
"engine/effects/engineeffectrack.cpp",
Expand Down
24 changes: 12 additions & 12 deletions src/broadcast/broadcastmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,13 @@ void BroadcastManager::slotControlEnabled(double v) {
bool atLeastOneEnabled = false;
QList<BroadcastProfilePtr> profiles = m_pBroadcastSettings->profiles();
for(BroadcastProfilePtr profile : profiles) {
if(profile->getEnabled()) {
if (profile->getEnabled()) {
atLeastOneEnabled = true;
break;
}
}

if(!atLeastOneEnabled) {
if (!atLeastOneEnabled) {
m_pBroadcastEnabled->set(false);
emit(broadcastEnabled(0.0));
QMessageBox::warning(nullptr, tr("Action failed"),
Expand All @@ -112,7 +112,7 @@ void BroadcastManager::slotControlEnabled(double v) {
m_pStatusCO->forceSet(STATUSCO_UNCONNECTED);
QList<BroadcastProfilePtr> profiles = m_pBroadcastSettings->profiles();
for(BroadcastProfilePtr profile : profiles) {
if(profile->connectionStatus() == BroadcastProfile::STATUS_FAILURE) {
if (profile->connectionStatus() == BroadcastProfile::STATUS_FAILURE) {
profile->setConnectionStatus(BroadcastProfile::STATUS_UNCONNECTED);
}
}
Expand All @@ -133,9 +133,9 @@ void BroadcastManager::slotProfilesChanged() {
QVector<NetworkOutputStreamWorkerPtr> workers = m_pNetworkStream->outputWorkers();
for(NetworkOutputStreamWorkerPtr pWorker : workers) {
ShoutConnectionPtr connection = qSharedPointerCast<ShoutConnection>(pWorker);
if(connection) {
if (connection) {
BroadcastProfilePtr profile = connection->profile();
if(profile->connectionStatus() == BroadcastProfile::STATUS_FAILURE
if (profile->connectionStatus() == BroadcastProfile::STATUS_FAILURE
&& !profile->getEnabled()) {
profile->setConnectionStatus(BroadcastProfile::STATUS_UNCONNECTED);
}
Expand All @@ -145,10 +145,10 @@ void BroadcastManager::slotProfilesChanged() {
}

bool BroadcastManager::addConnection(BroadcastProfilePtr profile) {
if(!profile)
if (!profile)
return false;

if(findConnectionForProfile(profile).isNull() == false) {
if (findConnectionForProfile(profile).isNull() == false) {
return false;
}

Expand All @@ -164,11 +164,11 @@ bool BroadcastManager::addConnection(BroadcastProfilePtr profile) {
}

bool BroadcastManager::removeConnection(BroadcastProfilePtr profile) {
if(!profile)
if (!profile)
return false;

ShoutConnectionPtr connection = findConnectionForProfile(profile);
if(connection) {
if (connection) {
disconnect(profile.data(), SIGNAL(connectionStatusChanged(int)),
this, SLOT(slotConnectionStatusChanged(int)));

Expand All @@ -188,10 +188,10 @@ ShoutConnectionPtr BroadcastManager::findConnectionForProfile(BroadcastProfilePt
QVector<NetworkOutputStreamWorkerPtr> workers = m_pNetworkStream->outputWorkers();
for(NetworkOutputStreamWorkerPtr pWorker : workers) {
ShoutConnectionPtr connection = qSharedPointerCast<ShoutConnection>(pWorker);
if(connection.isNull())
if (connection.isNull())
continue;

if(connection->profile() == profile) {
if (connection->profile() == profile) {
return connection;
}
}
Expand All @@ -207,7 +207,7 @@ void BroadcastManager::slotConnectionStatusChanged(int newState) {
// Collect status info
QList<BroadcastProfilePtr> profiles = m_pBroadcastSettings->profiles();
for (BroadcastProfilePtr profile : profiles) {
if(!profile->getEnabled()) {
if (!profile->getEnabled()) {
continue;
}
enabledCount++;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/autopaneffect.h"
#include "effects/builtin/autopaneffect.h"

#include <QtDebug>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "effects/native/bessel4lvmixeqeffect.h"
#include "effects/builtin/bessel4lvmixeqeffect.h"

#include "effects/native/equalizer_util.h"
#include "effects/builtin/equalizer_util.h"
#include "util/math.h"

// static
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "control/controlproxy.h"
#include "effects/effect.h"
#include "effects/effectprocessor.h"
#include "effects/native/lvmixeqbase.h"
#include "effects/builtin/lvmixeqbase.h"
#include "engine/effects/engineeffect.h"
#include "engine/effects/engineeffectparameter.h"
#include "engine/enginefilterbessel4.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "effects/native/bessel8lvmixeqeffect.h"
#include "effects/builtin/bessel8lvmixeqeffect.h"

#include "effects/native/equalizer_util.h"
#include "effects/builtin/equalizer_util.h"
#include "util/math.h"

// static
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef BESSEL8LVMIXEQEFFECT_H
#define BESSEL8LVMIXEQEFFECT_H

#include "effects/native/lvmixeqbase.h"
#include "effects/builtin/lvmixeqbase.h"

#include <QMap>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "effects/native/biquadfullkilleqeffect.h"
#include "effects/builtin/biquadfullkilleqeffect.h"

#include "effects/native/equalizer_util.h"
#include "effects/builtin/equalizer_util.h"
#include "util/math.h"

namespace {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "engine/effects/engineeffectparameter.h"
#include "engine/enginefilterbiquad1.h"
#include "engine/enginefilterbessel4.h"
#include "effects/native/lvmixeqbase.h"
#include "effects/builtin/lvmixeqbase.h"
#include "engine/enginefilterdelay.h"
#include "util/class.h"
#include "util/defs.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/bitcrushereffect.h"
#include "effects/builtin/bitcrushereffect.h"

#include "util/sample.h"

Expand Down
File renamed without changes.
59 changes: 59 additions & 0 deletions src/effects/builtin/builtinbackend.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@

#include <QtDebug>

#include "effects/builtin/builtinbackend.h"
#include "effects/builtin/flangereffect.h"
#include "effects/builtin/bitcrushereffect.h"
#include "effects/builtin/balanceeffect.h"
#include "effects/builtin/linkwitzriley8eqeffect.h"
#include "effects/builtin/bessel8lvmixeqeffect.h"
#include "effects/builtin/bessel4lvmixeqeffect.h"
#include "effects/builtin/threebandbiquadeqeffect.h"
#include "effects/builtin/biquadfullkilleqeffect.h"
#include "effects/builtin/graphiceqeffect.h"
#include "effects/builtin/parametriceqeffect.h"
#include "effects/builtin/filtereffect.h"
#include "effects/builtin/moogladder4filtereffect.h"
#ifndef __MACAPPSTORE__
#include "effects/builtin/reverbeffect.h"
#endif
#include "effects/builtin/echoeffect.h"
#include "effects/builtin/autopaneffect.h"
#include "effects/builtin/phasereffect.h"
#include "effects/builtin/loudnesscontoureffect.h"
#include "effects/builtin/metronomeeffect.h"
#include "effects/builtin/tremoloeffect.h"

BuiltInBackend::BuiltInBackend(QObject* pParent)
: EffectsBackend(pParent, EffectBackendType::BuiltIn) {
// Keep this list in a reasonable order
// Mixing EQs
registerEffect<Bessel4LVMixEQEffect>();
registerEffect<Bessel8LVMixEQEffect>();
registerEffect<LinkwitzRiley8EQEffect>();
registerEffect<ThreeBandBiquadEQEffect>();
registerEffect<BiquadFullKillEQEffect>();
// Compensations EQs
registerEffect<GraphicEQEffect>();
registerEffect<ParametricEQEffect>();
registerEffect<LoudnessContourEffect>();
// Fading Effects
registerEffect<FilterEffect>();
registerEffect<MoogLadder4FilterEffect>();
registerEffect<BitCrusherEffect>();
registerEffect<BalanceEffect>();
// Fancy effects
registerEffect<FlangerEffect>();
registerEffect<EchoEffect>();
registerEffect<AutoPanEffect>();
#ifndef __MACAPPSTORE__
registerEffect<ReverbEffect>();
#endif
registerEffect<PhaserEffect>();
registerEffect<MetronomeEffect>();
registerEffect<TremoloEffect>();
}

BuiltInBackend::~BuiltInBackend() {
//qDebug() << debugString() << "destroyed";
}
19 changes: 19 additions & 0 deletions src/effects/builtin/builtinbackend.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef BUILTINBACKEND_H
#define BUILTINBACKEND_H

#include "effects/defs.h"
#include "effects/effectsbackend.h"

class BuiltInBackend : public EffectsBackend {
Q_OBJECT
public:
BuiltInBackend(QObject* pParent);
virtual ~BuiltInBackend();

private:
QString debugString() const {
return "BuiltInBackend";
}
};

#endif /* BUILTINBACKEND_H */
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/echoeffect.h"
#include "effects/builtin/echoeffect.h"

#include <QtDebug>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef EFFECTS_NATIVE_EQUALIZER_UTIL_H
#define EFFECTS_NATIVE_EQUALIZER_UTIL_H
#ifndef EFFECTS_BUILTIN_EQUALIZER_UTIL_H
#define EFFECTS_BUILTIN_EQUALIZER_UTIL_H

#include <QObject>

Expand Down Expand Up @@ -94,4 +94,4 @@ class EqualizerUtil {
};


#endif /* EFFECTS_NATIVE_EQUALIZER_UTIL_H */
#endif /* EFFECTS_BUILTIN_EQUALIZER_UTIL_H */
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/filtereffect.h"
#include "effects/builtin/filtereffect.h"
#include "util/math.h"

namespace {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/flangereffect.h"
#include "effects/builtin/flangereffect.h"

#include <QtDebug>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/graphiceqeffect.h"
#include "effects/builtin/graphiceqeffect.h"
#include "util/math.h"

#define Q 1.2247449
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "effects/native/linkwitzriley8eqeffect.h"
#include "effects/builtin/linkwitzriley8eqeffect.h"

#include "effects/native/equalizer_util.h"
#include "effects/builtin/equalizer_util.h"
#include "util/math.h"

static const unsigned int kStartupSamplerate = 44100;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/loudnesscontoureffect.h"
#include "effects/builtin/loudnesscontoureffect.h"
#include "util/math.h"

namespace {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/moogladder4filtereffect.h"
#include "effects/builtin/moogladder4filtereffect.h"
#include "util/math.h"


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/parametriceqeffect.h"
#include "effects/builtin/parametriceqeffect.h"
#include "util/math.h"

namespace {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/phasereffect.h"
#include "effects/builtin/phasereffect.h"

#include <QDebug>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/reverbeffect.h"
#include "effects/builtin/reverbeffect.h"

#include <QtDebug>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "effects/native/threebandbiquadeqeffect.h"
#include "effects/builtin/threebandbiquadeqeffect.h"

#include "effects/native/equalizer_util.h"
#include "effects/builtin/equalizer_util.h"
#include "util/math.h"

namespace {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "effects/native/tremoloeffect.h"
#include "effects/builtin/tremoloeffect.h"

namespace {
// Used to avoid gain discontinuities when changing parameters too fast
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/effects/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ enum class EffectEnableState {
Enabling
};

enum class EffectBackendType {
BuiltIn,
LV2,
Unknown
};

enum class SignalProcessingStage {
Prefader,
Postfader
Expand Down
Loading

0 comments on commit 3e96599

Please sign in to comment.