From 1bb989920536ef364b6866dd63d4583e872239d1 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Fri, 19 Jun 2020 21:48:31 +0200 Subject: [PATCH] Use pragma once & remove copyright headers, little reformatting --- src/engine/sidechain/enginerecord.cpp | 15 +----------- src/engine/sidechain/enginerecord.h | 12 +-------- src/engine/sidechain/enginesidechain.cpp | 31 ++++++------------------ src/engine/sidechain/sidechainworker.h | 5 +--- src/mixer/playermanager.cpp | 20 +++++++-------- src/mixxx.cpp | 2 +- 6 files changed, 20 insertions(+), 65 deletions(-) diff --git a/src/engine/sidechain/enginerecord.cpp b/src/engine/sidechain/enginerecord.cpp index 879e35517ed..0d2bdcc0c6a 100644 --- a/src/engine/sidechain/enginerecord.cpp +++ b/src/engine/sidechain/enginerecord.cpp @@ -1,11 +1,3 @@ -/*************************************************************************** - enginerecord.cpp - class to record the mix - ------------------- - copyright : (C) 2007 by John Sully - copyright : (C) 2010 by Tobias Rafreider - email : -***************************************************************************/ - #include "engine/sidechain/enginerecord.h" #include "preferences/usersettings.h" @@ -39,10 +31,6 @@ EngineRecord::~EngineRecord() { delete m_pSamplerate; } - - - - void EngineRecord::updateFromPreferences() { m_fileName = m_pConfig->getValueString(ConfigKey(RECORDING_PREF_KEY, "Path")); m_baTitle = m_pConfig->getValueString(ConfigKey(RECORDING_PREF_KEY, "Title")); @@ -69,8 +57,7 @@ void EngineRecord::updateFromPreferences() { } } -bool EngineRecord::metaDataHasChanged() -{ +bool EngineRecord::metaDataHasChanged() { //Originally, m_iMetaDataLife was used so that getCurrentPlayingTrack was called //less often, because it was calculating it. //Nowadays (since Mixxx 1.11), it just accesses a map on a thread safe method. diff --git a/src/engine/sidechain/enginerecord.h b/src/engine/sidechain/enginerecord.h index e858f81b9e2..92fb3c5a927 100644 --- a/src/engine/sidechain/enginerecord.h +++ b/src/engine/sidechain/enginerecord.h @@ -1,12 +1,4 @@ -/*************************************************************************** - enginerecord.h - description - ------------------- - copyright : (C) 2007 by John Sully - email : - ***************************************************************************/ - -#ifndef ENGINERECORD_H -#define ENGINERECORD_H +#pragma once #include #include @@ -93,5 +85,3 @@ class EngineRecord : public QObject, public EncoderCallback, public SideChainWor quint64 m_cueTrack; bool m_bCueIsEnabled; }; - -#endif diff --git a/src/engine/sidechain/enginesidechain.cpp b/src/engine/sidechain/enginesidechain.cpp index fe9c5626410..186671e8d5e 100644 --- a/src/engine/sidechain/enginesidechain.cpp +++ b/src/engine/sidechain/enginesidechain.cpp @@ -1,27 +1,3 @@ -/*************************************************************************** - enginesidechain.cpp - ------------------- - copyright : (C) 2008 Albert Santoni - email : gamegod \a\t users.sf.net -***************************************************************************/ - -/*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -// This class provides a way to do audio processing that does not need -// to be executed in real-time. For example, broadcast encoding -// and recording encoding can be done here. This class uses double-buffering -// to increase the amount of time the CPU has to do whatever work needs to -// be done, and that work is executed in a separate thread. (Threading -// allows the next buffer to be filled while processing a buffer that's is -// already full.) - #include "engine/sidechain/enginesidechain.h" #include @@ -37,6 +13,13 @@ #define SIDECHAIN_BUFFER_SIZE 65536 +/// This class provides a way to do audio processing that does not need +/// to be executed in real-time. For example, broadcast encoding +/// and recording encoding can be done here. This class uses double-buffering +/// to increase the amount of time the CPU has to do whatever work needs to +/// be done, and that work is executed in a separate thread. (Threading +/// allows the next buffer to be filled while processing a buffer that's is +/// already full.) EngineSideChain::EngineSideChain( UserSettingsPointer pConfig, CSAMPLE* sidechainMix) diff --git a/src/engine/sidechain/sidechainworker.h b/src/engine/sidechain/sidechainworker.h index 514929339ab..ecc4f94c084 100644 --- a/src/engine/sidechain/sidechainworker.h +++ b/src/engine/sidechain/sidechainworker.h @@ -1,5 +1,4 @@ -#ifndef SIDECHAINWORKER_H -#define SIDECHAINWORKER_H +#pragma once #include "util/types.h" @@ -10,5 +9,3 @@ class SideChainWorker { virtual void process(const CSAMPLE* pBuffer, const int iBufferSize) = 0; virtual void shutdown() = 0; }; - -#endif /* SIDECHAINWORKER_H */ diff --git a/src/mixer/playermanager.cpp b/src/mixer/playermanager.cpp index 347fc5cb310..6d3b520d924 100644 --- a/src/mixer/playermanager.cpp +++ b/src/mixer/playermanager.cpp @@ -1,5 +1,3 @@ -// playermanager.cpp -// Created 6/1/2010 by RJ Ryan (rryan@mit.edu) #include "mixer/playermanager.h" #include @@ -34,11 +32,8 @@ const int kNumberOfAnalyzerThreads = math_max(1, QThread::idealThreadCount() / 2 } // anonymous namespace -//static QAtomicPointer PlayerManager::m_pCOPNumDecks; -//static QAtomicPointer PlayerManager::m_pCOPNumSamplers; -//static QAtomicPointer PlayerManager::m_pCOPNumPreviewDecks; PlayerManager::PlayerManager(UserSettingsPointer pConfig, @@ -369,13 +364,16 @@ void PlayerManager::addDeckInner() { int number = m_decks.count() + 1; - EngineChannel::ChannelOrientation orientation = EngineChannel::LEFT; - if (number % 2 == 0) { - orientation = EngineChannel::RIGHT; - } + EngineChannel::ChannelOrientation orientation = + number % 2 == 0 ? EngineChannel::RIGHT : EngineChannel::LEFT; - Deck* pDeck = new Deck(this, m_pConfig, m_pEngine, m_pEffectsManager, - m_pVisualsManager, orientation, group); + Deck* pDeck = new Deck(this, + m_pConfig, + m_pEngine, + m_pEffectsManager, + m_pVisualsManager, + orientation, + group); connect(pDeck->getEngineDeck(), &EngineDeck::noPassthroughInputConfigured, this, diff --git a/src/mixxx.cpp b/src/mixxx.cpp index 460431e96d6..c4092c20e08 100644 --- a/src/mixxx.cpp +++ b/src/mixxx.cpp @@ -306,7 +306,7 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) { m_pVCManager = NULL; #endif - // Create the player manager. (long) + // Create the player manager (long) m_pPlayerManager = new PlayerManager(pConfig, m_pSoundManager, m_pEffectsManager, m_pVisualsManager, m_pEngine); connect(m_pPlayerManager,