aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--bundle/state.ttl1
-rw-r--r--lib/synthpod_app.c10
3 files changed, 10 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d119806..1ad8cc0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ set(CMAKE_C_FLAGS "-std=gnu11 ${CMAKE_C_FLAGS}")
# options
option(BUILD_UI "Build user interface libraries" OFF)
option(BUILD_JACK "Build JACK standalone host" OFF)
-option(BUILD_PORTAUDIO "Build PortAudio standalone host" OFF)
+option(BUILD_PORTAUDIO "Build PortAudio standalone host (experimental)" OFF)
# eina
pkg_search_module(EINA REQUIRED eina>=1.8)
diff --git a/bundle/state.ttl b/bundle/state.ttl
index 72f6b24..11dd8a0 100644
--- a/bundle/state.ttl
+++ b/bundle/state.ttl
@@ -9,6 +9,7 @@
<>
a pset:Preset ;
lv2:appliesTo <http://open-music-kontrollers.ch/lv2/synthpod#stereo> ;
+ rdfs:label "state" ;
lv2:port [
lv2:symbol "control_in_1" ;
pset:value 0.0
diff --git a/lib/synthpod_app.c b/lib/synthpod_app.c
index 91ca9e6..2178951 100644
--- a/lib/synthpod_app.c
+++ b/lib/synthpod_app.c
@@ -1894,6 +1894,7 @@ sp_app_save(sp_app_t *app, LV2_State_Store_Function store,
app->driver->map, NULL, NULL, NULL, path,
_state_get_value, mod, LV2_STATE_IS_POD | LV2_STATE_IS_PORTABLE, features);
+ lilv_state_set_label(state, "state"); //TODO use path prefix?
lilv_state_save(app->world, app->driver->map, app->driver->unmap,
state, NULL, path, "state.ttl");
@@ -2058,9 +2059,14 @@ sp_app_restore(sp_app_t *app, LV2_State_Retrieve_Function retrieve,
return LV2_STATE_ERR_UNKNOWN;
// remove existing modules
- for(int m=0; m<app->num_mods; m++)
- _sp_app_mod_del(app, app->mods[m]);
+ int num_mods = app->num_mods;
+
app->num_mods = 0;
+ app->system.source = NULL; // if host should call port_connect()
+ app->system.sink = NULL; // if host should call port_connect()
+
+ for(int m=0; m<num_mods; m++)
+ _sp_app_mod_del(app, app->mods[m]);
// iterate over mods, create and apply states
for(cJSON *mod_json = cJSON_GetObjectItem(root_json, "items")->child;