/[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 1895 - (show annotations) (download) (as text)
Sun May 3 12:15:40 2009 UTC (14 years, 11 months ago) by persson
File MIME type: text/x-c++hdr
File size: 3314 byte(s)
* fixes for using large audio device buffers
* VST: added support for sample rate and buffer size changes
* VST: close editor (Fantasia) when the VST is removed
* minor fix in configure for mmsystem.h detection on MinGW
* removed warnings from gcc 4.4 and valgrind

1 /***************************************************************************
2 * *
3 * Copyright (C) 2008 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 #endif
51 };
52
53
54 class LinuxSamplerVst : public AudioEffectX, LinuxSampler::Plugin {
55 public:
56 LinuxSamplerVst(audioMasterCallback audioMaster);
57 ~LinuxSamplerVst();
58
59 void processReplacing(float** inputs, float** outputs,
60 VstInt32 sampleframes);
61 VstInt32 processEvents(VstEvents* events);
62
63 void resume();
64 void setProgram(VstInt32 program);
65 void setProgramName(char* name);
66 void getProgramName(char* name);
67 bool getProgramNameIndexed(VstInt32 category, VstInt32 index, char* text);
68
69 void setSampleRate(float sampleRate);
70 void setBlockSize(VstInt32 blockSize);
71
72 bool getOutputProperties(VstInt32 index, VstPinProperties* properties);
73
74 bool getEffectName(char* name);
75 bool getVendorString(char* text);
76 bool getProductString(char* text);
77 VstInt32 getVendorVersion();
78 VstInt32 canDo(char* text);
79 VstInt32 getChunk(void** data, bool isPreset);
80 VstInt32 setChunk(void* data, VstInt32 byteSize, bool isPreset);
81
82 private:
83 static const int NbPrograms = 128;
84
85 LinuxSamplerVstProgram* Programs;
86
87 char* StateBuf;
88 String SavedChunk;
89 };
90 }
91
92 #endif

  ViewVC Help
Powered by ViewVC