Rename Engine to LmmsCore, but typedef'd as Engine to prevent name conflicts with ZASFx
Document the Engine renaming better & link to relevant issues/PRs
This commit is contained in:
1 parent
d31ac1773b
commit
c519921306
6 files changed
+35
-24
No files matched your search
@@ -37,7 +37,7 @@
|
|||||||
#include "MemoryManager.h"
|
#include "MemoryManager.h"
|
||||||
#include "lmmsversion.h"
|
#include "lmmsversion.h"
|
||||||
|
|
||||||
class Engine;
|
class LmmsCore;
|
||||||
|
|
||||||
|
|
||||||
const QString PROJECTS_PATH = "projects/";
|
const QString PROJECTS_PATH = "projects/";
|
||||||
@@ -284,7 +284,7 @@ private:
|
|||||||
settingsMap m_settings;
|
settingsMap m_settings;
|
||||||
|
|
||||||
|
|
||||||
friend class Engine;
|
friend class LmmsCore;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
+17
-6
@@ -42,7 +42,19 @@ class Song;
|
|||||||
class Ladspa2LMMS;
|
class Ladspa2LMMS;
|
||||||
|
|
||||||
|
|
||||||
class EXPORT Engine : public QObject
|
// Note: This class is called 'LmmsCore' instead of 'Engine' because of naming
|
||||||
|
// conflicts caused by ZynAddSubFX. See https://github.com/LMMS/lmms/issues/2269
|
||||||
|
// and https://github.com/LMMS/lmms/pull/2118 for more details.
|
||||||
|
//
|
||||||
|
// The workaround was to rename Lmms' Engine so that it has a different symbol
|
||||||
|
// name in the object files, but typedef it back to 'Engine' and keep it inside
|
||||||
|
// of Engine.h so that the rest of the codebase can be oblivious to this issue
|
||||||
|
// (and it could be fixed without changing every single file).
|
||||||
|
|
||||||
|
class LmmsCore;
|
||||||
|
typedef LmmsCore Engine;
|
||||||
|
|
||||||
|
class EXPORT LmmsCore : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -91,11 +103,11 @@ public:
|
|||||||
}
|
}
|
||||||
static void updateFramesPerTick();
|
static void updateFramesPerTick();
|
||||||
|
|
||||||
static inline Engine * inst()
|
static inline LmmsCore * inst()
|
||||||
{
|
{
|
||||||
if( s_instanceOfMe == NULL )
|
if( s_instanceOfMe == NULL )
|
||||||
{
|
{
|
||||||
s_instanceOfMe = new Engine();
|
s_instanceOfMe = new LmmsCore();
|
||||||
}
|
}
|
||||||
return s_instanceOfMe;
|
return s_instanceOfMe;
|
||||||
}
|
}
|
||||||
@@ -128,12 +140,11 @@ private:
|
|||||||
static Ladspa2LMMS * s_ladspaManager;
|
static Ladspa2LMMS * s_ladspaManager;
|
||||||
|
|
||||||
// even though most methods are static, an instance is needed for Qt slots/signals
|
// even though most methods are static, an instance is needed for Qt slots/signals
|
||||||
static Engine * s_instanceOfMe;
|
static LmmsCore * s_instanceOfMe;
|
||||||
|
|
||||||
friend class GuiApplication;
|
friend class GuiApplication;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ private:
|
|||||||
l_sortable_plugin_t m_analysisTools;
|
l_sortable_plugin_t m_analysisTools;
|
||||||
l_sortable_plugin_t m_otherPlugins;
|
l_sortable_plugin_t m_otherPlugins;
|
||||||
|
|
||||||
friend class Engine;
|
friend class LmmsCore;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -445,7 +445,7 @@ private:
|
|||||||
|
|
||||||
bool m_metronomeActive;
|
bool m_metronomeActive;
|
||||||
|
|
||||||
friend class Engine;
|
friend class LmmsCore;
|
||||||
friend class MixerWorkerThread;
|
friend class MixerWorkerThread;
|
||||||
|
|
||||||
} ;
|
} ;
|
||||||
|
|||||||
+1
-1
@@ -366,7 +366,7 @@ private:
|
|||||||
VstSyncController m_vstSyncController;
|
VstSyncController m_vstSyncController;
|
||||||
|
|
||||||
|
|
||||||
friend class Engine;
|
friend class LmmsCore;
|
||||||
friend class SongEditor;
|
friend class SongEditor;
|
||||||
friend class mainWindow;
|
friend class mainWindow;
|
||||||
friend class ControllerRackView;
|
friend class ControllerRackView;
|
||||||
|
|||||||
+13
-13
@@ -38,21 +38,21 @@
|
|||||||
|
|
||||||
#include "GuiApplication.h"
|
#include "GuiApplication.h"
|
||||||
|
|
||||||
float Engine::s_framesPerTick;
|
float LmmsCore::s_framesPerTick;
|
||||||
Mixer* Engine::s_mixer = NULL;
|
Mixer* LmmsCore::s_mixer = NULL;
|
||||||
FxMixer * Engine::s_fxMixer = NULL;
|
FxMixer * LmmsCore::s_fxMixer = NULL;
|
||||||
BBTrackContainer * Engine::s_bbTrackContainer = NULL;
|
BBTrackContainer * LmmsCore::s_bbTrackContainer = NULL;
|
||||||
Song * Engine::s_song = NULL;
|
Song * LmmsCore::s_song = NULL;
|
||||||
ProjectJournal * Engine::s_projectJournal = NULL;
|
ProjectJournal * LmmsCore::s_projectJournal = NULL;
|
||||||
Ladspa2LMMS * Engine::s_ladspaManager = NULL;
|
Ladspa2LMMS * LmmsCore::s_ladspaManager = NULL;
|
||||||
DummyTrackContainer * Engine::s_dummyTC = NULL;
|
DummyTrackContainer * LmmsCore::s_dummyTC = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Engine::init( bool renderOnly )
|
void LmmsCore::init( bool renderOnly )
|
||||||
{
|
{
|
||||||
Engine *engine = inst();
|
LmmsCore *engine = inst();
|
||||||
|
|
||||||
emit engine->initProgress(tr("Generating wavetables"));
|
emit engine->initProgress(tr("Generating wavetables"));
|
||||||
// generate (load from file) bandlimited wavetables
|
// generate (load from file) bandlimited wavetables
|
||||||
@@ -82,7 +82,7 @@ void Engine::init( bool renderOnly )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Engine::destroy()
|
void LmmsCore::destroy()
|
||||||
{
|
{
|
||||||
s_projectJournal->stopAllJournalling();
|
s_projectJournal->stopAllJournalling();
|
||||||
s_mixer->stopProcessing();
|
s_mixer->stopProcessing();
|
||||||
@@ -110,10 +110,10 @@ void Engine::destroy()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Engine::updateFramesPerTick()
|
void LmmsCore::updateFramesPerTick()
|
||||||
{
|
{
|
||||||
s_framesPerTick = s_mixer->processingSampleRate() * 60.0f * 4 /
|
s_framesPerTick = s_mixer->processingSampleRate() * 60.0f * 4 /
|
||||||
DefaultTicksPerTact / s_song->getTempo();
|
DefaultTicksPerTact / s_song->getTempo();
|
||||||
}
|
}
|
||||||
|
|
||||||
Engine * Engine::s_instanceOfMe = NULL;
|
LmmsCore * LmmsCore::s_instanceOfMe = NULL;
|
||||||
Reference in new issue
Block a user