From 5a4444d520f97321bfdae6cd22c28fa1a7f835ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Sun, 6 Jan 2019 01:04:08 +0100 Subject: Added new VisualsManager class --- src/mixer/playermanager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/mixer/playermanager.cpp') diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index 866c3f7b12..5a3ed6b547 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -34,11 +34,13 @@ QAtomicPointer PlayerManager::m_pCOPNumPreviewDecks; PlayerManager::PlayerManager(UserSettingsPointer pConfig, SoundManager* pSoundManager, EffectsManager* pEffectsManager, + VisualsManager* pVisualsManager, EngineMaster* pEngine) : m_mutex(QMutex::Recursive), m_pConfig(pConfig), m_pSoundManager(pSoundManager), m_pEffectsManager(pEffectsManager), + m_pVisualsManager(pVisualsManager), m_pEngine(pEngine), // NOTE(XXX) LegacySkinParser relies on these controls being Controls // and not ControlProxies. @@ -339,7 +341,7 @@ void PlayerManager::addDeckInner() { } Deck* pDeck = new Deck(this, m_pConfig, m_pEngine, m_pEffectsManager, - orientation, group); + m_pVisualsManager, orientation, group); connect(pDeck, SIGNAL(noPassthroughInputConfigured()), this, SIGNAL(noDeckPassthroughInputConfigured())); connect(pDeck, SIGNAL(noVinylControlInputConfigured()), @@ -405,8 +407,8 @@ void PlayerManager::addSamplerInner() { EngineChannel::ChannelOrientation orientation = EngineChannel::CENTER; Sampler* pSampler = new Sampler(this, m_pConfig, m_pEngine, - m_pEffectsManager, orientation, group); - if (m_pAnalyzerQueue) { + m_pEffectsManager, m_pVisualsManager, orientation, group); + if (m_pAnalyzerQueue) { connect(pSampler, SIGNAL(newTrackLoaded(TrackPointer)), m_pAnalyzerQueue, SLOT(slotAnalyseTrack(TrackPointer))); } @@ -431,8 +433,7 @@ void PlayerManager::addPreviewDeckInner() { EngineChannel::ChannelOrientation orientation = EngineChannel::CENTER; PreviewDeck* pPreviewDeck = new PreviewDeck(this, m_pConfig, m_pEngine, - m_pEffectsManager, orientation, - group); + m_pEffectsManager, m_pVisualsManager, orientation, group); if (m_pAnalyzerQueue) { connect(pPreviewDeck, SIGNAL(newTrackLoaded(TrackPointer)), m_pAnalyzerQueue, SLOT(slotAnalyseTrack(TrackPointer))); -- cgit v1.2.3 From 0de92209024a4cd20b350e18b561b089f8988661 Mon Sep 17 00:00:00 2001 From: Be Date: Sat, 5 Jan 2019 13:32:50 -0600 Subject: CO::connectValueChangeRequest replace SLOT with functors --- src/mixer/playermanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mixer/playermanager.cpp') diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index d2b7bb4d56..71a19706a8 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -64,15 +64,15 @@ PlayerManager::PlayerManager(UserSettingsPointer pConfig, ConfigKey("[Master]", "num_auxiliaries"), true, true)), m_pTrackAnalysisScheduler(TrackAnalysisScheduler::NullPointer()) { m_pCONumDecks->connectValueChangeRequest(this, - SLOT(slotChangeNumDecks(double)), Qt::DirectConnection); + [=](double value){slotChangeNumDecks(value);}, Qt::DirectConnection); m_pCONumSamplers->connectValueChangeRequest(this, - SLOT(slotChangeNumSamplers(double)), Qt::DirectConnection); + [=](double value){slotChangeNumSamplers(value);}, Qt::DirectConnection); m_pCONumPreviewDecks->connectValueChangeRequest(this, - SLOT(slotChangeNumPreviewDecks(double)), Qt::DirectConnection); + [=](double value){slotChangeNumPreviewDecks(value);}, Qt::DirectConnection); m_pCONumMicrophones->connectValueChangeRequest(this, - SLOT(slotChangeNumMicrophones(double)), Qt::DirectConnection); + [=](double value){slotChangeNumMicrophones(value);}, Qt::DirectConnection); m_pCONumAuxiliaries->connectValueChangeRequest(this, - SLOT(slotChangeNumAuxiliaries(double)), Qt::DirectConnection); + [=](double value){slotChangeNumAuxiliaries(value);}, Qt::DirectConnection); // This is parented to the PlayerManager so does not need to be deleted m_pSamplerBank = new SamplerBank(this); -- cgit v1.2.3 From 2ab7121f08fe12b628848720bb432af43aca0175 Mon Sep 17 00:00:00 2001 From: Be Date: Sat, 5 Jan 2019 16:06:29 -0600 Subject: remove need for lambdas with connectValueChange(Request) and remove old SLOT syntax for ControlProxy::connectValueChangeRequest. That was easier than getting it to play nice with the templating required for the new functor syntax. --- src/mixer/playermanager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mixer/playermanager.cpp') diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index 71a19706a8..3adb345af6 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -64,15 +64,15 @@ PlayerManager::PlayerManager(UserSettingsPointer pConfig, ConfigKey("[Master]", "num_auxiliaries"), true, true)), m_pTrackAnalysisScheduler(TrackAnalysisScheduler::NullPointer()) { m_pCONumDecks->connectValueChangeRequest(this, - [=](double value){slotChangeNumDecks(value);}, Qt::DirectConnection); + &PlayerManager::slotChangeNumDecks, Qt::DirectConnection); m_pCONumSamplers->connectValueChangeRequest(this, - [=](double value){slotChangeNumSamplers(value);}, Qt::DirectConnection); + &PlayerManager::slotChangeNumSamplers, Qt::DirectConnection); m_pCONumPreviewDecks->connectValueChangeRequest(this, - [=](double value){slotChangeNumPreviewDecks(value);}, Qt::DirectConnection); + &PlayerManager::slotChangeNumPreviewDecks, Qt::DirectConnection); m_pCONumMicrophones->connectValueChangeRequest(this, - [=](double value){slotChangeNumMicrophones(value);}, Qt::DirectConnection); + &PlayerManager::slotChangeNumMicrophones, Qt::DirectConnection); m_pCONumAuxiliaries->connectValueChangeRequest(this, - [=](double value){slotChangeNumAuxiliaries(value);}, Qt::DirectConnection); + &PlayerManager::slotChangeNumAuxiliaries, Qt::DirectConnection); // This is parented to the PlayerManager so does not need to be deleted m_pSamplerBank = new SamplerBank(this); -- cgit v1.2.3 From 2b2d748c55099fd2d9fbb8dc106f257983acea9b Mon Sep 17 00:00:00 2001 From: Be Date: Sun, 6 Jan 2019 12:36:08 -0600 Subject: move EngineChannel classes to their own folder --- src/mixer/playermanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mixer/playermanager.cpp') diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index 8b97f37175..c58bc23beb 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -8,7 +8,7 @@ #include "control/controlobject.h" #include "effects/effectsmanager.h" #include "effects/effectrack.h" -#include "engine/enginedeck.h" +#include "engine/channels/enginedeck.h" #include "engine/enginemaster.h" #include "library/library.h" #include "mixer/auxiliary.h" -- cgit v1.2.3 From 7c3fb1dc3826e761b68c85fdd3de54fc542e685c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Fri, 11 Jan 2019 22:18:50 +0100 Subject: remove QT4 compatibility layer from util/compatibility.h --- src/mixer/playermanager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mixer/playermanager.cpp') diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index c58bc23beb..aa05ba3341 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -209,7 +209,7 @@ bool PlayerManager::isPreviewDeckGroup(const QString& group, int* number) { unsigned int PlayerManager::numDecks() { // We do this to cache the control once it is created so callers don't incur // a hashtable lookup every time they call this. - ControlProxy* pCOPNumDecks = load_atomic_pointer(m_pCOPNumDecks); + ControlProxy* pCOPNumDecks = m_pCOPNumDecks.load(); if (pCOPNumDecks == nullptr) { pCOPNumDecks = new ControlProxy(ConfigKey("[Master]", "num_decks")); if (!pCOPNumDecks->valid()) { @@ -227,7 +227,7 @@ unsigned int PlayerManager::numDecks() { unsigned int PlayerManager::numSamplers() { // We do this to cache the control once it is created so callers don't incur // a hashtable lookup every time they call this. - ControlProxy* pCOPNumSamplers = load_atomic_pointer(m_pCOPNumSamplers); + ControlProxy* pCOPNumSamplers = m_pCOPNumSamplers.load(); if (pCOPNumSamplers == nullptr) { pCOPNumSamplers = new ControlProxy(ConfigKey("[Master]", "num_samplers")); if (!pCOPNumSamplers->valid()) { @@ -245,7 +245,7 @@ unsigned int PlayerManager::numSamplers() { unsigned int PlayerManager::numPreviewDecks() { // We do this to cache the control once it is created so callers don't incur // a hashtable lookup every time they call this. - ControlProxy* pCOPNumPreviewDecks = load_atomic_pointer(m_pCOPNumPreviewDecks); + ControlProxy* pCOPNumPreviewDecks = m_pCOPNumPreviewDecks.load(); if (pCOPNumPreviewDecks == nullptr) { pCOPNumPreviewDecks = new ControlProxy( ConfigKey("[Master]", "num_preview_decks")); -- cgit v1.2.3