-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathengine.h
61 lines (52 loc) · 1.55 KB
/
engine.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
#ifndef ENGINE_H
#define ENGINE_H
#ifdef __linux__
//~ #include <lilv/lilv.h>
#include <sys/utsname.h>
#include "snd.h"
#include "jack.h"
#else
#include "pa.h"
#endif
#include <iostream>
#include <filesystem>
#include <unistd.h>
#include "SharedLibrary.h"
#include "Plugin.h"
#include "process.h"
#include "util.h"
#include "LockFreeQueue.h"
#include "FileWriter.h"
using json = nlohmann::json;
class Engine {
public:
int sampleRate ;
FileWriter * fileWriter ;
AudioDriver * driver = nullptr;
std::string home ;
std::vector <SharedLibrary *> libraries ;
Processor * processor = nullptr ;
char * libraryPath = nullptr; //= std::string ("libs/linux/x86_64/");
std::string assetPath = std::string ();
nlohmann::json ladspaJson, lv2Json, creators, categories, lv2Map, amps, knobs ;
std::vector <std::string> * ladspaPlugins, * lv2Plugins ;
LilvPlugins* plugins = nullptr ;
LockFreeQueueManager * queueManager ;
Engine ();
void buildPluginChain ();
int moveActivePluginDown (int);
int moveActivePluginUp (int);
static std::vector<Plugin *> * activePlugins ;
bool addPlugin(char* library, int pluginIndex, SharedLibrary::PluginType _type) ;
bool openAudio ();
bool addPluginByName (char *);
bool savePreset (std::string, std::string);
bool load_preset (json );
json getPreset ();
void set_plugin_audio_file (int index, char * filename);
void set_plugin_file (int index, char * filename) ;
void print ();
void startRecording ();
void stopRecording ();
};
#endif