summaryrefslogtreecommitdiffstats
path: root/src/server/LV2Block.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-10-06 15:51:11 -0400
committerDavid Robillard <d@drobilla.net>2016-10-06 15:51:11 -0400
commit77f6e9e63ce9ad329b43c92e8a9556aff8e78f2f (patch)
tree50dca5900274ca2f95c3d06069b7fe0bd285e46b /src/server/LV2Block.hpp
parenta513af4218d0a62a45960d04ff6ddeecb8d3d4f5 (diff)
downloadingen-77f6e9e63ce9ad329b43c92e8a9556aff8e78f2f.tar.gz
ingen-77f6e9e63ce9ad329b43c92e8a9556aff8e78f2f.tar.bz2
ingen-77f6e9e63ce9ad329b43c92e8a9556aff8e78f2f.zip
Add plugin state saving
This only works with a server-side save, so the GUI now uses that if the server is not running remotely, where "remotely" is defined as "via TCP". This isn't perfect, since running ingen via TCP locally is a perfectly valid thing to do, but it will do for now.
Diffstat (limited to 'src/server/LV2Block.hpp')
-rw-r--r--src/server/LV2Block.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/LV2Block.hpp b/src/server/LV2Block.hpp
index b8438d9e..b6be8ccf 100644
--- a/src/server/LV2Block.hpp
+++ b/src/server/LV2Block.hpp
@@ -48,9 +48,10 @@ public:
~LV2Block();
- bool instantiate(BufferFactory& bufs);
+ bool instantiate(BufferFactory& bufs, const LilvState* state);
LilvInstance* instance() { return instance(0); }
+ bool save_state(const std::string& dir) const;
BlockImpl* duplicate(Engine& engine,
const Raul::Symbol& symbol,
@@ -69,7 +70,7 @@ public:
LilvState* load_preset(const Raul::URI& uri);
- void apply_state(Worker* worker, LilvState* state);
+ void apply_state(Worker* worker, const LilvState* state);
boost::optional<Resource> save_preset(const Raul::URI& bundle,
const Properties& props);
@@ -79,14 +80,14 @@ public:
BufferRef buf,
SampleCount offset);
+ static LilvState* load_state(World* world, const std::string& path);
+
protected:
SPtr<LilvInstance> make_instance(URIs& uris,
SampleRate rate,
uint32_t voice,
bool preparing);
- void load_default_state(Worker* worker);
-
inline LilvInstance* instance(uint32_t voice) {
return (LilvInstance*)(*_instances)[voice].get();
}