Embed in a separate window
This commit is contained in:
committed by
Lukas W
parent
a81f4ca8e9
commit
878dd94e8d
@@ -414,6 +414,7 @@ private:
|
||||
enum RemoteMessageIDs
|
||||
{
|
||||
IdUndefined,
|
||||
IdHostInfoGotten,
|
||||
IdInitDone,
|
||||
IdQuit,
|
||||
IdSampleRateInformation,
|
||||
@@ -426,6 +427,7 @@ enum RemoteMessageIDs
|
||||
IdChangeOutputCount,
|
||||
IdShowUI,
|
||||
IdHideUI,
|
||||
IdToggleUI,
|
||||
IdSaveSettingsToString,
|
||||
IdSaveSettingsToFile,
|
||||
IdLoadSettingsFromString,
|
||||
@@ -769,6 +771,12 @@ public:
|
||||
|
||||
bool init( const QString &pluginExecutable, bool waitForInitDoneMsg );
|
||||
|
||||
inline void waitForHostInfoGotten()
|
||||
{
|
||||
m_failed = waitForMessage( IdHostInfoGotten ).id
|
||||
!= IdHostInfoGotten;
|
||||
}
|
||||
|
||||
inline void waitForInitDone( bool _busyWaiting = true )
|
||||
{
|
||||
m_failed = waitForMessage( IdInitDone, _busyWaiting ).id != IdInitDone;
|
||||
@@ -801,6 +809,13 @@ public:
|
||||
unlock();
|
||||
}
|
||||
|
||||
void toggleUI()
|
||||
{
|
||||
lock();
|
||||
sendMessage( IdToggleUI );
|
||||
unlock();
|
||||
}
|
||||
|
||||
inline bool failed() const
|
||||
{
|
||||
return m_failed;
|
||||
@@ -1155,6 +1170,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
|
||||
@@ -1182,6 +1198,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 )
|
||||
@@ -1197,6 +1214,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 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user