RemoteVstPlugin: send updates of current program name if changed

Send current program name back to host if current program has changed.
This commit is contained in:
Tobias Doerffel
2012-11-26 19:18:20 +01:00
parent 1b7ae1f7a9
commit 56b07e29c2

View File

@@ -291,6 +291,7 @@ private:
bpm_t m_bpm;
double m_currentSamplePos;
int m_currentProgram;
} ;
@@ -312,7 +313,8 @@ RemoteVstPlugin::RemoteVstPlugin( key_t _shm_in, key_t _shm_out ) :
m_outputs( NULL ),
m_midiEvents(),
m_bpm( 0 ),
m_currentSamplePos( 0 )
m_currentSamplePos( 0 ),
m_currentProgram( -1 )
{
pthread_mutex_init( &m_pluginLock, NULL );
@@ -701,6 +703,13 @@ void RemoteVstPlugin::process( const sampleFrame * _in, sampleFrame * _out )
#endif
m_currentSamplePos += bufferSize();
int newCurrentProgram = pluginDispatch( effGetProgram );
if( newCurrentProgram != m_currentProgram )
{
m_currentProgram = newCurrentProgram;
sendCurrentProgramName();
}
}