Merge pull request #3786 from LMMS/fix/qt5-vst

Add all the Qt5 Linux VST implementations
This commit is contained in:
Lukas W
2017-12-18 22:15:45 +01:00
committed by GitHub
26 changed files with 703 additions and 506 deletions

View File

@@ -32,9 +32,9 @@
#include <QtCore/QPair>
#include <QtCore/QStringList>
#include <QtCore/QVector>
#include <QtCore/QObject>
#include "export.h"
#include "MemoryManager.h"
class LmmsCore;
@@ -51,9 +51,9 @@ const QString TRACK_ICON_PATH = "track_icons/";
const QString LOCALE_PATH = "locale/";
class EXPORT ConfigManager
class EXPORT ConfigManager : public QObject
{
MM_OPERATORS
Q_OBJECT
public:
static inline ConfigManager * inst()
{
@@ -210,6 +210,9 @@ public:
return m_recentlyOpenedProjects;
}
static QStringList availabeVstEmbedMethods();
QString vstEmbedMethod() const;
// returns true if the working dir (e.g. ~/lmms) exists on disk
bool hasWorkingDir() const;
@@ -242,6 +245,8 @@ public:
// creates the working directory & subdirectories on disk.
void createWorkingDir();
signals:
void valueChanged( QString cls, QString attribute, QString value );
private:
static ConfigManager * s_instanceOfMe;

View File

@@ -414,6 +414,7 @@ private:
enum RemoteMessageIDs
{
IdUndefined,
IdHostInfoGotten,
IdInitDone,
IdQuit,
IdSampleRateInformation,
@@ -427,6 +428,8 @@ enum RemoteMessageIDs
IdChangeInputOutputCount,
IdShowUI,
IdHideUI,
IdToggleUI,
IdIsUIVisible,
IdSaveSettingsToString,
IdSaveSettingsToFile,
IdLoadSettingsFromString,
@@ -781,7 +784,13 @@ public:
#endif
}
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg );
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg, QStringList extraArgs = {} );
inline void waitForHostInfoGotten()
{
m_failed = waitForMessage( IdHostInfoGotten ).id
!= IdHostInfoGotten;
}
inline void waitForInitDone( bool _busyWaiting = true )
{
@@ -801,18 +810,21 @@ public:
unlock();
}
void showUI()
virtual void toggleUI()
{
lock();
sendMessage( IdShowUI );
sendMessage( IdToggleUI );
unlock();
}
void hideUI()
int isUIVisible()
{
lock();
sendMessage( IdHideUI );
sendMessage( IdIsUIVisible );
unlock();
message m = waitForMessage( IdIsUIVisible );
return m.id != IdIsUIVisible ? -1 : m.getInt() ? 1 : 0;
}
inline bool failed() const
@@ -830,6 +842,9 @@ public:
m_commMutex.unlock();
}
public slots:
virtual void showUI();
virtual void hideUI();
protected:
inline void setSplittedChannels( bool _on )
@@ -1206,6 +1221,7 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
m_vstSyncData = (VstSyncData *) m_shmQtID.data();
m_bufferSize = m_vstSyncData->m_bufferSize;
m_sampleRate = m_vstSyncData->m_sampleRate;
sendMessage( IdHostInfoGotten );
return;
}
#else
@@ -1233,6 +1249,7 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
{
m_bufferSize = m_vstSyncData->m_bufferSize;
m_sampleRate = m_vstSyncData->m_sampleRate;
sendMessage( IdHostInfoGotten );
// detach segment
if( shmdt(m_vstSyncData) == -1 )
@@ -1248,6 +1265,12 @@ RemotePluginClient::RemotePluginClient( const char * socketPath ) :
// if attaching shared memory fails
sendMessage( IdSampleRateInformation );
sendMessage( IdBufferSizeInformation );
if( waitForMessage( IdBufferSizeInformation ).id
!= IdBufferSizeInformation )
{
fprintf( stderr, "Could not get buffer size information\n" );
}
sendMessage( IdHostInfoGotten );
}

View File

@@ -204,7 +204,8 @@ private:
MswMap m_midiIfaceSetupWidgets;
trMap m_midiIfaceNames;
QComboBox* m_vstEmbedComboBox;
QString m_vstEmbedMethod;
} ;