Skip to content

Commit

Permalink
Add getEQEffectRack method to EffectsManager
Browse files Browse the repository at this point in the history
  • Loading branch information
badescunicu committed Sep 10, 2014
1 parent e82a1ab commit 358e074
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/effects/effectsmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ EffectRackPointer EffectsManager::getEffectRack(int i) {
return m_pEffectChainManager->getEffectRack(i);
}

EffectRackPointer EffectsManager::getEQEffectRack() {
// The EQ Rack is the last one

This comment has been minimized.

Copy link
@ywwg

ywwg Nov 18, 2014

Member

This is really dangerous for future versions. As soon as we add a new rack, everyone's configs will break because suddenly their EQ knobs are controlling a second effect rack.

This comment has been minimized.

Copy link
@rryan

rryan Nov 18, 2014

Member

Already discussed in the PR thread :). Were going to use a different CO namespace.

int eqRackNumber = m_pEffectChainManager->getEffectRacksSize();
return m_pEffectChainManager->getEffectRack(eqRackNumber - 1);
}

void EffectsManager::addEqualizer(int channelNumber) {
int rackNum = getEffectChainManager()->getEffectRacksSize();
EffectRackPointer pRack = getEffectRack(rackNum - 1);
Expand Down
1 change: 1 addition & 0 deletions src/effects/effectsmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class EffectsManager : public QObject {

EffectRackPointer addEffectRack();
EffectRackPointer getEffectRack(int rack);
EffectRackPointer getEQEffectRack();

QString getNextEffectId(const QString& effectId);
QString getPrevEffectId(const QString& effectId);
Expand Down

0 comments on commit 358e074

Please sign in to comment.