/[svn]/linuxsampler/trunk/src/hostplugins/vst/PluginVst.h
ViewVC logotype

Contents of /linuxsampler/trunk/src/hostplugins/vst/PluginVst.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2347 - (show annotations) (download) (as text)
Sun Jun 10 15:47:32 2012 UTC (8 years, 7 months ago) by persson
File MIME type: text/x-c++hdr
File size: 3377 byte(s)
* VST: try to open Fantasia automatically on Linux and Mac too (on
  Linux, the Fantasia jar should be placed in <prefix>/share/java)
* VST: fixed crashes on Linux Ardour and EnergyXT

1 /***************************************************************************
2 * *
3 * Copyright (C) 2008 - 2012 Andreas Persson *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
18 * MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #ifndef LS_PLUGINVST_H
22 #define LS_PLUGINVST_H
23
24 #include "../../drivers/Plugin.h"
25
26 #include <audioeffectx.h>
27 #include <aeffeditor.h>
28
29
30 namespace {
31
32 class LinuxSamplerVstProgram {
33 public:
34 LinuxSamplerVstProgram();
35 char name[kVstMaxProgNameLen + 1];
36 };
37
38
39 class LinuxSamplerEditor : public AEffEditor {
40 public:
41 LinuxSamplerEditor(AudioEffect* effect);
42 ~LinuxSamplerEditor();
43 bool open(void* ptr);
44 void close();
45 bool getRect(ERect** rect);
46 private:
47 #ifdef WIN32
48 HANDLE ProcessHandle;
49 LPTSTR Command;
50 #else
51 pid_t pid;
52 #endif
53 static String FindFantasia();
54 };
55
56
57 class LinuxSamplerVst : public AudioEffectX, LinuxSampler::Plugin {
58 public:
59 LinuxSamplerVst(audioMasterCallback audioMaster);
60 ~LinuxSamplerVst();
61
62 void processReplacing(float** inputs, float** outputs,
63 VstInt32 sampleframes);
64 VstInt32 processEvents(VstEvents* events);
65
66 void resume();
67 void setProgram(VstInt32 program);
68 void setProgramName(char* name);
69 void getProgramName(char* name);
70 bool getProgramNameIndexed(VstInt32 category, VstInt32 index, char* text);
71
72 void setSampleRate(float sampleRate);
73 void setBlockSize(VstInt32 blockSize);
74
75 bool getOutputProperties(VstInt32 index, VstPinProperties* properties);
76
77 bool getEffectName(char* name);
78 bool getVendorString(char* text);
79 bool getProductString(char* text);
80 VstInt32 getVendorVersion();
81 VstInt32 canDo(char* text);
82 VstInt32 getChunk(void** data, bool isPreset);
83 VstInt32 setChunk(void* data, VstInt32 byteSize, bool isPreset);
84
85 private:
86 static const int NbPrograms = 128;
87
88 LinuxSamplerVstProgram* Programs;
89
90 char* StateBuf;
91 String SavedChunk;
92 };
93 }
94
95 #endif

  ViewVC Help
Powered by ViewVC