started implementing stop mechanism for vst

This commit is contained in:
Volker Fischer 2010-03-28 16:19:59 +00:00
parent 836c7f0361
commit 5d067a45ee
2 changed files with 18 additions and 1 deletions

View File

@ -49,6 +49,11 @@ CLlconVST::CLlconVST ( audioMasterCallback AudioMaster ) :
// set default program name
GetName ( strProgName );
// we want a single shot timer to shut down the connection if no
// processing is done anymore (VST host has stopped the stream)
TimerOnOff.setSingleShot ( true );
TimerOnOff.setInterval ( VST_STOP_TIMER_INTERVAL );
// connect timer event
connect ( &TimerOnOff, SIGNAL ( timeout() ),
this, SLOT ( OnTimerOnOff() ) );
@ -64,13 +69,17 @@ bool CLlconVST::GetName ( char* cName )
void CLlconVST::OnTimerOnOff()
{
// TODO
// stop client since VST host seems to have stopped
Client.Stop();
}
void CLlconVST::processReplacing ( float** pvIn,
float** pvOut,
VstInt32 iNumSamples )
{
// reset stop timer
TimerOnOff.start();
// get pointers to actual buffers
float* pfIn0 = pvIn[0];
float* pfIn1 = pvIn[1];
@ -91,6 +100,9 @@ void CLlconVST::processDoubleReplacing ( double** pvIn,
double** pvOut,
VstInt32 iNumSamples )
{
// reset stop timer
TimerOnOff.start();
// get pointers to actual buffers
double* pdIn0 = pvIn[0];
double* pdIn1 = pvIn[1];

View File

@ -33,6 +33,11 @@
#include "client.h"
/* Definitions ****************************************************************/
// timeout after which the llcon client is stopped
#define VST_STOP_TIMER_INTERVAL 1000
/* Classes ********************************************************************/
class CLlconVST : public QObject, public AudioEffectX
{