Revert irrelevant changes
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtCore/QMutexLocker>
|
||||
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "PlayHandle.h"
|
||||
|
||||
class EffectChain;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "Model.h"
|
||||
#include "TimePos.h"
|
||||
#include "ValueBuffer.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ModelVisitor.h"
|
||||
|
||||
// simple way to map a property of a view to a model
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "TrackView.h"
|
||||
|
||||
|
||||
class LMMS_EXPORT AutomationTrack : public Track
|
||||
class AutomationTrack : public Track
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <QtCore/QMap>
|
||||
#include <QStaticText>
|
||||
|
||||
#include "lmms_export.h"
|
||||
#include "TrackContentObjectView.h"
|
||||
#include "Track.h"
|
||||
#include "TrackView.h"
|
||||
@@ -40,7 +39,7 @@ class TrackLabelButton;
|
||||
class TrackContainer;
|
||||
|
||||
|
||||
class LMMS_EXPORT BBTCO : public TrackContentObject
|
||||
class BBTCO : public TrackContentObject
|
||||
{
|
||||
public:
|
||||
BBTCO( Track * _track );
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
#include "lmms_basics.h"
|
||||
#include "lmms_constants.h"
|
||||
#include "interpolation.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
template<ch_cnt_t CHANNELS=DEFAULT_CHANNELS> class BasicFilters;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QDomDocument>
|
||||
|
||||
#include "lmms_export.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "ProjectVersion.h"
|
||||
|
||||
class QTextStream;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include "lmms_basics.h"
|
||||
#include "lmms_math.h"
|
||||
#include "interpolation.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
// brief usage
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#define DETUNING_HELPER_H
|
||||
|
||||
#include "InlineAutomation.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class DetuningHelper : public InlineAutomation
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "Mixer.h"
|
||||
#include "AutomatableModel.h"
|
||||
#include "TempoSyncKnobModel.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
class EffectChain;
|
||||
class EffectControls;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <QString>
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "Plugin.h"
|
||||
#include "TimePos.h"
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#ifndef MAINAPPLICATION_H
|
||||
#define MAINAPPLICATION_H
|
||||
|
||||
#include "lmms_export.h"
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#include <QApplication>
|
||||
@@ -36,7 +35,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(LMMS_BUILD_WIN32)
|
||||
class LMMS_EXPORT MainApplication : public QApplication, public QAbstractNativeEventFilter
|
||||
class MainApplication : public QApplication, public QAbstractNativeEventFilter
|
||||
#else
|
||||
class MainApplication : public QApplication
|
||||
#endif
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef MAIN_WINDOW_H
|
||||
#define MAIN_WINDOW_H
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
#include <QtCore/QBasicTimer>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QList>
|
||||
@@ -45,7 +43,7 @@ class PluginView;
|
||||
class ToolButton;
|
||||
|
||||
|
||||
class LMMS_EXPORT MainWindow : public QMainWindow
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
@@ -63,7 +61,7 @@ public:
|
||||
void addSpacingToToolBar( int _size );
|
||||
|
||||
// wrap the widget with a window decoration and add it to the workspace
|
||||
SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags = QFlag(0));
|
||||
LMMS_EXPORT SubWindow* addWindowedWidget(QWidget *w, Qt::WindowFlags windowFlags = QFlag(0));
|
||||
|
||||
|
||||
///
|
||||
|
||||
42
include/MemoryHelper.h
Normal file
42
include/MemoryHelper.h
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2014 Simon Symeonidis <lethaljellybean/at/gmail/com>
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
* 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 program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this program (see COPYING); if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef MEMORY_HELPER_H
|
||||
#define MEMORY_HELPER_H
|
||||
|
||||
/**
|
||||
* Helper class to alocate aligned memory and free it.
|
||||
*/
|
||||
class MemoryHelper {
|
||||
public:
|
||||
|
||||
static void* alignedMalloc( size_t );
|
||||
|
||||
static void alignedFree( void* );
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
/*
|
||||
* Memory.h
|
||||
* MemoryManager.h
|
||||
*
|
||||
* Copyright (c) 2017 Lukas W <lukaswhl/at/gmail.com>
|
||||
* Copyright (c) 2014 Simon Symeonidis <lethaljellybean/at/gmail/com>
|
||||
* Copyright (c) 2014 Vesa Kivimäki
|
||||
* Copyright (c) 2004-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
* Copyright (c) 2007-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
|
||||
*
|
||||
* This file is part of LMMS - https://lmms.io
|
||||
*
|
||||
@@ -32,36 +31,25 @@
|
||||
#include <vector>
|
||||
|
||||
#include "lmms_export.h"
|
||||
#include "NiftyCounter.h"
|
||||
|
||||
class LMMS_EXPORT MemoryManager
|
||||
{
|
||||
public:
|
||||
struct ThreadGuard
|
||||
{
|
||||
ThreadGuard();
|
||||
~ThreadGuard();
|
||||
};
|
||||
|
||||
static void * alloc( size_t size );
|
||||
static void free( void * ptr );
|
||||
|
||||
private:
|
||||
static void initialize();
|
||||
static void deinitialize();
|
||||
static void thread_initialize();
|
||||
static void thread_deinitialize();
|
||||
public:
|
||||
typedef NiftyCounter<MemoryManager::initialize, MemoryManager::deinitialize> MmCounter;
|
||||
typedef NiftyCounterTL<MemoryManager::thread_initialize, MemoryManager::thread_deinitialize> ThreadGuard;
|
||||
};
|
||||
|
||||
static MemoryManager::MmCounter _mm_counter;
|
||||
static thread_local MemoryManager::MmCounter _mm_thread_counter;
|
||||
|
||||
template<typename T>
|
||||
class LMMS_EXPORT MmAllocator
|
||||
struct MmAllocator
|
||||
{
|
||||
public:
|
||||
MmAllocator() = default;
|
||||
template< class U > MmAllocator( const MmAllocator<U>& other ) {}
|
||||
typedef T value_type;
|
||||
template<class U> struct rebind { typedef MmAllocator<U> other; };
|
||||
|
||||
template<class U> struct rebind { typedef MmAllocator<U> other; };
|
||||
|
||||
T* allocate( std::size_t n )
|
||||
{
|
||||
@@ -76,36 +64,6 @@ public:
|
||||
typedef std::vector<T, MmAllocator<T> > vector;
|
||||
};
|
||||
|
||||
class _AlignedAllocator_Base
|
||||
{
|
||||
protected:
|
||||
void* alloc_impl( size_t alignment, size_t size );
|
||||
void dealloc_impl( void* p );
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class AlignedAllocator : _AlignedAllocator_Base
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
template<class U> struct rebind { typedef AlignedAllocator<U> other; };
|
||||
|
||||
AlignedAllocator( size_t alignment = 16 )
|
||||
: alignment(alignment) {}
|
||||
|
||||
T* allocate( std::size_t n )
|
||||
{
|
||||
return reinterpret_cast<T*>( alloc_impl( alignment, sizeof(T) * n ) );
|
||||
}
|
||||
|
||||
void deallocate( T* p, std::size_t )
|
||||
{
|
||||
dealloc_impl( p );
|
||||
}
|
||||
|
||||
private:
|
||||
std::size_t alignment;
|
||||
};
|
||||
|
||||
#define MM_OPERATORS \
|
||||
public: \
|
||||
@@ -26,7 +26,7 @@
|
||||
#define MIDI_EVENT_PROCESSOR_H
|
||||
|
||||
#include "MidiEvent.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "TimePos.h"
|
||||
|
||||
// all classes being able to process MIDI-events should inherit from this
|
||||
|
||||
@@ -27,11 +27,10 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include "lmms_export.h"
|
||||
#include "lmms_basics.h"
|
||||
#include "MicroTimer.h"
|
||||
|
||||
class LMMS_EXPORT MixerProfiler
|
||||
class MixerProfiler
|
||||
{
|
||||
public:
|
||||
MixerProfiler();
|
||||
|
||||
@@ -25,8 +25,6 @@
|
||||
#ifndef MODELVISITOR_H
|
||||
#define MODELVISITOR_H
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
class AutomatableModel;
|
||||
class BoolModel;
|
||||
class IntModel;
|
||||
@@ -34,7 +32,7 @@ class FloatModel;
|
||||
class ComboBoxModel;
|
||||
class TempoSyncKnobModel;
|
||||
|
||||
class LMMS_EXPORT ModelVisitor
|
||||
class ModelVisitor
|
||||
{
|
||||
template<class ParentType = AutomatableModel, class ModelType>
|
||||
void up(ModelType& m) { visit(static_cast<ParentType&>(m)); }
|
||||
@@ -48,7 +46,7 @@ public:
|
||||
virtual ~ModelVisitor();
|
||||
};
|
||||
|
||||
class LMMS_EXPORT ConstModelVisitor
|
||||
class ConstModelVisitor
|
||||
{
|
||||
template<class ParentType = AutomatableModel, class ModelType>
|
||||
void up(const ModelType& m) {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "lmms_export.h"
|
||||
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
#include "ThreadableJob.h"
|
||||
#include "lmms_basics.h"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "JournallingObject.h"
|
||||
#include "Model.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
|
||||
class QWidget;
|
||||
|
||||
@@ -31,13 +31,12 @@
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
#include <limits>
|
||||
#include "lmms_export.h"
|
||||
|
||||
/*! \brief Version number parsing and comparison
|
||||
*
|
||||
* Parses and compares version information. i.e. "1.0.3" < "1.0.10"
|
||||
*/
|
||||
class LMMS_EXPORT ProjectVersion
|
||||
class ProjectVersion
|
||||
{
|
||||
public:
|
||||
enum CompareType : int { None = 0, Major=1, Minor=2, Release=3, Stage=4, Build=5, All = std::numeric_limits<int>::max() };
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "OutputSettings.h"
|
||||
|
||||
|
||||
class LMMS_EXPORT RenderManager : public QObject
|
||||
class RenderManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#include <QObject>
|
||||
#include "lmms_basics.h"
|
||||
#include "lmms_math.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
/** \brief A basic LMMS ring buffer for single-thread use. For thread and realtime safe alternative see LocklessRingBuffer.
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "lmms_basics.h"
|
||||
#include "lmms_math.h"
|
||||
#include "shared_object.h"
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
|
||||
class QPainter;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Memory.h"
|
||||
#include "MemoryManager.h"
|
||||
#include "lmms_export.h"
|
||||
|
||||
class LMMS_EXPORT ValueBuffer : public std::vector<float>
|
||||
|
||||
Reference in New Issue
Block a user