23 |
|
|
24 |
#include <lv2.h> |
#include <lv2.h> |
25 |
#include "lv2_event.h" |
#include "lv2_event.h" |
26 |
#include "lv2_persist.h" |
#include "lv2_state.h" |
27 |
#include "lv2_uri_map.h" |
#include "lv2_uri_map.h" |
|
#include "lv2_files.h" |
|
28 |
#include "../../drivers/Plugin.h" |
#include "../../drivers/Plugin.h" |
29 |
|
|
30 |
namespace { |
namespace { |
38 |
void Activate(); |
void Activate(); |
39 |
void Run(uint32_t SampleCount); |
void Run(uint32_t SampleCount); |
40 |
void Deactivate(); |
void Deactivate(); |
41 |
void Save(LV2_Persist_Store_Function store, void* data); |
void Save(LV2_State_Store_Function store, void* data); |
42 |
void Restore(LV2_Persist_Retrieve_Function retrieve, void* data); |
void Restore(LV2_State_Retrieve_Function retrieve, void* data); |
43 |
|
|
44 |
protected: |
protected: |
45 |
virtual String PathToState(const String& string); |
virtual String PathToState(const String& string); |
53 |
float* Out[2]; |
float* Out[2]; |
54 |
LV2_Event_Buffer* MidiBuf; |
LV2_Event_Buffer* MidiBuf; |
55 |
LV2_URI_Map_Feature* UriMap; |
LV2_URI_Map_Feature* UriMap; |
56 |
LV2_Files_Path_Support* PathSupport; |
LV2_State_Map_Path* MapPath; |
57 |
LV2_Files_New_File_Support* NewFileSupport; |
LV2_State_Make_Path* MakePath; |
58 |
|
|
59 |
String DefaultState; |
String DefaultState; |
60 |
}; |
}; |
64 |
static const LV2_Descriptor* Lv2Descriptor() { |
static const LV2_Descriptor* Lv2Descriptor() { |
65 |
return &Instance.Lv2; |
return &Instance.Lv2; |
66 |
} |
} |
67 |
static const LV2_Persist* Lv2PersistDescriptor() { |
static const LV2_State_Interface* Lv2StateInterface() { |
68 |
return &Instance.Persist; |
return &Instance.StateInterface; |
69 |
} |
} |
70 |
private: |
private: |
71 |
LV2_Descriptor Lv2; |
LV2_Descriptor Lv2; |
72 |
LV2_Persist Persist; |
LV2_State_Interface StateInterface; |
73 |
|
|
74 |
PluginInfo(); |
PluginInfo(); |
75 |
static PluginInfo Instance; |
static PluginInfo Instance; |
87 |
static void cleanup(LV2_Handle instance); |
static void cleanup(LV2_Handle instance); |
88 |
static const void* extension_data(const char* uri); |
static const void* extension_data(const char* uri); |
89 |
|
|
90 |
static void save(LV2_Handle handle, |
static void save(LV2_Handle handle, |
91 |
LV2_Persist_Store_Function store, |
LV2_State_Store_Function store, |
92 |
void* data); |
void* data); |
93 |
|
|
94 |
static void restore(LV2_Handle handle, |
static void restore(LV2_Handle handle, |
95 |
LV2_Persist_Retrieve_Function retrieve, |
LV2_State_Retrieve_Function retrieve, |
96 |
void* data); |
void* data); |
97 |
} |
} |
98 |
} |
} |
99 |
|
|