Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Wait for reply when updating sample rate
- Loading branch information
|
@@ -419,6 +419,7 @@ enum RemoteMessageIDs |
|
|
IdQuit, |
|
|
IdSampleRateInformation, |
|
|
IdBufferSizeInformation, |
|
|
IdInformationUpdated, |
|
|
IdMidiEvent, |
|
|
IdStartProcessing, |
|
|
IdProcessingDone, |
|
@@ -807,6 +808,7 @@ class EXPORT RemotePlugin : public QObject, public RemotePluginBase |
|
|
{ |
|
|
lock(); |
|
|
sendMessage( message( IdSampleRateInformation ).addInt( _sr ) ); |
|
|
waitForMessage( IdInformationUpdated, true ); |
|
|
unlock(); |
|
|
} |
|
|
|
|
@@ -1318,9 +1320,14 @@ bool RemotePluginClient::processMessage( const message & _m ) |
|
|
case IdSampleRateInformation: |
|
|
m_sampleRate = _m.getInt(); |
|
|
updateSampleRate(); |
|
|
reply_message.id = IdInformationUpdated; |
|
|
reply = true; |
|
|
break; |
|
|
|
|
|
case IdBufferSizeInformation: |
|
|
// Should LMMS gain the ability to change buffer size |
|
|
// without a restart, it must wait for this message to |
|
|
// complete processing or else risk VST crashes |
|
|
m_bufferSize = _m.getInt(); |
|
|
updateBufferSize(); |
|
|
break; |
|
|
|
@@ -636,12 +636,7 @@ void RemoteVstPlugin::init( const std::string & _plugin_file ) |
|
|
|
|
|
updateInOutCount(); |
|
|
updateBufferSize(); |
|
|
|
|
|
// some plugins have to set samplerate during init |
|
|
if( m_vstSyncData->hasSHM ) |
|
|
{ |
|
|
updateSampleRate(); |
|
|
} |
|
|
updateSampleRate(); |
|
|
|
|
|
/* set program to zero */ |
|
|
/* i comment this out because it breaks dfx Geometer |
|
|
|
@@ -306,6 +306,7 @@ void VstPlugin::updateSampleRate() |
|
|
lock(); |
|
|
sendMessage( message( IdSampleRateInformation ). |
|
|
addInt( Engine::mixer()->processingSampleRate() ) ); |
|
|
waitForMessage( IdInformationUpdated, true ); |
|
|
unlock(); |
|
|
} |
|
|
|
|
|