started implementing stop mechanism for vst
This commit is contained in:
parent
836c7f0361
commit
5d067a45ee
2 changed files with 18 additions and 1 deletions
|
@ -49,6 +49,11 @@ CLlconVST::CLlconVST ( audioMasterCallback AudioMaster ) :
|
||||||
// set default program name
|
// set default program name
|
||||||
GetName ( strProgName );
|
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 timer event
|
||||||
connect ( &TimerOnOff, SIGNAL ( timeout() ),
|
connect ( &TimerOnOff, SIGNAL ( timeout() ),
|
||||||
this, SLOT ( OnTimerOnOff() ) );
|
this, SLOT ( OnTimerOnOff() ) );
|
||||||
|
@ -64,13 +69,17 @@ bool CLlconVST::GetName ( char* cName )
|
||||||
|
|
||||||
void CLlconVST::OnTimerOnOff()
|
void CLlconVST::OnTimerOnOff()
|
||||||
{
|
{
|
||||||
// TODO
|
// stop client since VST host seems to have stopped
|
||||||
|
Client.Stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CLlconVST::processReplacing ( float** pvIn,
|
void CLlconVST::processReplacing ( float** pvIn,
|
||||||
float** pvOut,
|
float** pvOut,
|
||||||
VstInt32 iNumSamples )
|
VstInt32 iNumSamples )
|
||||||
{
|
{
|
||||||
|
// reset stop timer
|
||||||
|
TimerOnOff.start();
|
||||||
|
|
||||||
// get pointers to actual buffers
|
// get pointers to actual buffers
|
||||||
float* pfIn0 = pvIn[0];
|
float* pfIn0 = pvIn[0];
|
||||||
float* pfIn1 = pvIn[1];
|
float* pfIn1 = pvIn[1];
|
||||||
|
@ -91,6 +100,9 @@ void CLlconVST::processDoubleReplacing ( double** pvIn,
|
||||||
double** pvOut,
|
double** pvOut,
|
||||||
VstInt32 iNumSamples )
|
VstInt32 iNumSamples )
|
||||||
{
|
{
|
||||||
|
// reset stop timer
|
||||||
|
TimerOnOff.start();
|
||||||
|
|
||||||
// get pointers to actual buffers
|
// get pointers to actual buffers
|
||||||
double* pdIn0 = pvIn[0];
|
double* pdIn0 = pvIn[0];
|
||||||
double* pdIn1 = pvIn[1];
|
double* pdIn1 = pvIn[1];
|
||||||
|
|
|
@ -33,6 +33,11 @@
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Definitions ****************************************************************/
|
||||||
|
// timeout after which the llcon client is stopped
|
||||||
|
#define VST_STOP_TIMER_INTERVAL 1000
|
||||||
|
|
||||||
|
|
||||||
/* Classes ********************************************************************/
|
/* Classes ********************************************************************/
|
||||||
class CLlconVST : public QObject, public AudioEffectX
|
class CLlconVST : public QObject, public AudioEffectX
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue