Olive
vsthost.h
1 #ifndef VSTHOSTWIN_H
2 #define VSTHOSTWIN_H
3 
4 #ifndef NOVST
5 
6 #include "project/effect.h"
7 
8 #include "io/crossplatformlib.h"
9 
10 #include "include/vestige.h"
11 
12 // Plugin's dispatcher function
13 typedef intptr_t (*dispatcherFuncPtr)(AEffect *effect, int32_t opCode, int32_t index, int32_t value, void *ptr, float opt);
14 
15 class QDialog;
16 
17 class VSTHost : public Effect {
18  Q_OBJECT
19 public:
20  VSTHost(Clip* c, const EffectMeta* em);
21  ~VSTHost();
22  void process_audio(double timecode_start, double timecode_end, quint8* samples, int nb_bytes, int channel_count);
23 
24  void custom_load(QXmlStreamReader& stream);
25  void save(QXmlStreamWriter& stream);
26 private slots:
27  void show_interface(bool show);
28  void uncheck_show_button();
29  void change_plugin();
30 private:
31  EffectField* file_field;
32 
33  void loadPlugin();
34  void freePlugin();
35  dispatcherFuncPtr dispatcher;
36  AEffect* plugin;
37  bool configurePluginCallbacks();
38  void startPlugin();
39  void stopPlugin();
40  void resumePlugin();
41  void suspendPlugin();
42  bool canPluginDo(char *canDoString);
43  void processAudio(long numFrames);
44  float** inputs;
45  float** outputs;
46  QDialog* dialog;
47  QPushButton* show_interface_btn;
48  QByteArray data_cache;
49 
50 #if defined(__APPLE__)
51  CFBundleRef bundle;
52 #else
53  ModulePtr modulePtr;
54 #endif
55 };
56 
57 #endif
58 
59 #endif // VSTHOSTWIN_H
Definition: vsthost.h:17
Definition: effect.h:146
Definition: effect.h:27
Definition: vestige.h:275
Definition: clip.h:33
Definition: effectfield.h:23