1 /******************************************************************************\
2  * Copyright (c) 2004-2019
3  *
4  * Author(s):
5  *  Volker Fischer
6  *
7  ******************************************************************************
8  *
9  * This program is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License as published by the Free Software
11  * Foundation; either version 2 of the License, or (at your option) any later
12  * version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17  * details.
18  *
19  * You should have received a copy of the GNU General Public License along with
20  * this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22  *
23 \******************************************************************************/
24 
25 #if !defined( LLCONVST_HOIHGE76G34528_3_434DFGUHF1912__INCLUDED_ )
26 #    define LLCONVST_HOIHGE76G34528_3_434DFGUHF1912__INCLUDED_
27 
28 // copy the VST SDK in the llcon/windows directory: "llcon/windows/vstsdk2.4" to
29 // get it work
30 #    include "audioeffectx.h"
31 #    include <qtimer.h>
32 #    include "global.h"
33 #    include "client.h"
34 
35 /* Definitions ****************************************************************/
36 // timeout after which the llcon client is stopped
37 #    define VST_STOP_TIMER_INTERVAL 1000
38 
39 /* Classes ********************************************************************/
40 class CLlconVST : public QObject, public AudioEffectX
41 {
42     Q_OBJECT
43 
44 public:
45     CLlconVST ( audioMasterCallback AudioMaster );
46 
47     virtual void processReplacing ( float** pvIn, float** pvOut, VstInt32 iNumSamples );
48 
setProgramName(char * cName)49     virtual void setProgramName ( char* cName ) { vst_strncpy ( strProgName, cName, kVstMaxProgNameLen ); }
getProgramName(char * cName)50     virtual void getProgramName ( char* cName ) { vst_strncpy ( cName, strProgName, kVstMaxProgNameLen ); }
51 
getEffectName(char * cString)52     virtual bool     getEffectName ( char* cString ) { return GetName ( cString ); }
getVendorString(char * cString)53     virtual bool     getVendorString ( char* cString ) { return GetName ( cString ); }
getProductString(char * cString)54     virtual bool     getProductString ( char* cString ) { return GetName ( cString ); }
getVendorVersion()55     virtual VstInt32 getVendorVersion() { return 1000; }
56 
57 protected:
58     bool GetName ( char* cName );
59     char strProgName[kVstMaxProgNameLen + 1];
60 
61     CClient Client;
62     QTimer  TimerOnOff;
63 
64 protected slots:
65     void OnTimerOnOff();
66 };
67 
68 #endif /* !defined ( LLCONVST_HOIHGE76G34528_3_434DFGUHF1912__INCLUDED_ ) */
69