aboutsummaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c5
1 files changed, 5 insertions, 0 deletions
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;
}
}