From 8eaf389a6aaa4234651e9d568cb7ded6ffe27b09 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 3 Jan 2012 23:36:19 +0000 Subject: Don't run plugin while setting state (which violates threading rules). git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@3913 a436a847-0d15-0410-975c-d299462d15a1 --- src/state.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index 5edab41..d7a3d5b 100644 --- a/src/state.c +++ b/src/state.c @@ -132,8 +132,13 @@ void jalv_apply_state(Jalv* jalv, LilvState* state) { if (state) { + jalv->play_state = JALV_PAUSE_REQUESTED; + sem_wait(&jalv->paused); + lilv_state_restore( state, jalv->instance, set_port_value, jalv, 0, NULL); + + jalv->play_state = JALV_RUNNING; } } -- cgit v1.2.1