Skip to content

Commit

Permalink
Use pragma once & remove copyright headers, little reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Jun 19, 2020
1 parent 9c3c521 commit 1bb9899
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 65 deletions.
15 changes: 1 addition & 14 deletions src/engine/sidechain/enginerecord.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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"));
Expand All @@ -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.
Expand Down
12 changes: 1 addition & 11 deletions src/engine/sidechain/enginerecord.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
/***************************************************************************
enginerecord.h - description
-------------------
copyright : (C) 2007 by John Sully
email :
***************************************************************************/

#ifndef ENGINERECORD_H
#define ENGINERECORD_H
#pragma once

#include <QDataStream>
#include <QFile>
Expand Down Expand Up @@ -93,5 +85,3 @@ class EngineRecord : public QObject, public EncoderCallback, public SideChainWor
quint64 m_cueTrack;
bool m_bCueIsEnabled;
};

#endif
31 changes: 7 additions & 24 deletions src/engine/sidechain/enginesidechain.cpp
Original file line number Diff line number Diff line change
@@ -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 <QtDebug>
Expand All @@ -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)
Expand Down
5 changes: 1 addition & 4 deletions src/engine/sidechain/sidechainworker.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef SIDECHAINWORKER_H
#define SIDECHAINWORKER_H
#pragma once

#include "util/types.h"

Expand All @@ -10,5 +9,3 @@ class SideChainWorker {
virtual void process(const CSAMPLE* pBuffer, const int iBufferSize) = 0;
virtual void shutdown() = 0;
};

#endif /* SIDECHAINWORKER_H */
20 changes: 9 additions & 11 deletions src/mixer/playermanager.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// playermanager.cpp
// Created 6/1/2010 by RJ Ryan (rryan@mit.edu)
#include "mixer/playermanager.h"

#include <QMutexLocker>
Expand Down Expand Up @@ -34,11 +32,8 @@ const int kNumberOfAnalyzerThreads = math_max(1, QThread::idealThreadCount() / 2

} // anonymous namespace

//static
QAtomicPointer<ControlProxy> PlayerManager::m_pCOPNumDecks;
//static
QAtomicPointer<ControlProxy> PlayerManager::m_pCOPNumSamplers;
//static
QAtomicPointer<ControlProxy> PlayerManager::m_pCOPNumPreviewDecks;

PlayerManager::PlayerManager(UserSettingsPointer pConfig,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/mixxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1bb9899

Please sign in to comment.