This repository has been archived by the owner on Feb 13, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
remotepluginclient.h
102 lines (73 loc) · 2.46 KB
/
remotepluginclient.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/* -*- c-basic-offset: 4 -*- */
/*
dssi-vst: a DSSI plugin wrapper for VST effects and instruments
Copyright 2004-2010 Chris Cannam
*/
#ifndef REMOTE_PLUGIN_CLIENT_H
#define REMOTE_PLUGIN_CLIENT_H
#include "remoteplugin.h"
#include <string>
#include <vector>
#include <sys/shm.h>
// Any of the methods in this file, including constructors, should be
// considered capable of throwing RemotePluginClosedException. Do not
// call anything here without catching it.
class RemotePluginClient
{
public:
virtual ~RemotePluginClient();
std::string getFileIdentifiers();
float getVersion();
std::string getName();
std::string getMaker();
void setBufferSize(int);
void setSampleRate(int);
void reset();
void terminate();
int getInputCount();
int getOutputCount();
int getParameterCount();
std::string getParameterName(int);
void setParameter(int, float);
float getParameter(int);
float getParameterDefault(int);
void getParameters(int, int, float *);
int getProgramCount();
std::string getProgramName(int);
void setCurrentProgram(int);
bool hasMIDIInput();
// Must be three bytes per event
void sendMIDIData(unsigned char *data, int *frameoffsets, int events);
// Either inputs or outputs may be NULL if (and only if) there are none
void process(float **inputs, float **outputs);
void setDebugLevel(RemotePluginDebugLevel);
bool warn(std::string);
void showGUI(std::string guiData);
void hideGUI();
//Deryabin Andrew: vst chunks support
std::vector<char> getVSTChunk();
void setVSTChunk(std::vector<char> chunk);
//Deryabin Andrew: vst chunks support: end code
protected:
RemotePluginClient();
void cleanup();
void syncStartup();
private:
RemotePluginClient(const RemotePluginClient &); // not provided
RemotePluginClient &operator=(const RemotePluginClient &); // not provided
int m_controlRequestFd;
int m_controlResponseFd;
int m_processFd;
int m_shmFd;
char *m_controlRequestFileName;
char *m_controlResponseFileName;
char *m_processFileName;
char *m_shmFileName;
char *m_shm;
size_t m_shmSize;
int m_bufferSize;
int m_numInputs;
int m_numOutputs;
void sizeShm();
};
#endif