diff options
author | David Robillard <d@drobilla.net> | 2013-06-08 17:33:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-06-08 17:33:40 +0000 |
commit | 3501582c83f9abe27cc23a6a0526d1ddfa4138d9 (patch) | |
tree | d1d7a671b14a1e815960f106de3a8c0917073469 /src | |
parent | 6ec945342aac10c99b88a25b732b3bb989ebca9d (diff) | |
download | jalv-3501582c83f9abe27cc23a6a0526d1ddfa4138d9.tar.gz jalv-3501582c83f9abe27cc23a6a0526d1ddfa4138d9.tar.bz2 jalv-3501582c83f9abe27cc23a6a0526d1ddfa4138d9.zip |
Probably fix thread safety of debug printing (#911).
git-svn-id: http://svn.drobilla.net/lad/trunk/jalv@5122 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/jalv.c | 6 | ||||
-rw-r--r-- | src/jalv_internal.h | 1 |
2 files changed, 5 insertions, 2 deletions
@@ -763,7 +763,7 @@ jalv_emit_ui_events(Jalv* jalv) SerdNode p = serd_node_from_string(SERD_URI, USTR(NS_RDF "value")); LV2_Atom* atom = (LV2_Atom*)buf; char* str = sratom_to_turtle( - jalv->sratom, &jalv->unmap, "jalv:", &s, &p, + jalv->ui_sratom, &jalv->unmap, "jalv:", &s, &p, atom->type, atom->size, LV2_ATOM_BODY(atom)); printf("\n## Plugin => UI (%u bytes) ##\n%s\n", atom->size, str); free(str); @@ -819,7 +819,8 @@ main(int argc, char** argv) lv2_atom_forge_init(&jalv.forge, &jalv.map); - jalv.sratom = sratom_new(&jalv.map); + jalv.sratom = sratom_new(&jalv.map); + jalv.ui_sratom = sratom_new(&jalv.map); jalv.midi_event_id = uri_to_id( &jalv, "http://lv2plug.in/ns/ext/event", LV2_MIDI__MidiEvent); @@ -1164,6 +1165,7 @@ main(int argc, char** argv) zix_sem_destroy(&jalv.symap_lock); suil_host_free(jalv.ui_host); sratom_free(jalv.sratom); + sratom_free(jalv.ui_sratom); lilv_uis_free(jalv.uis); lilv_world_free(world); diff --git a/src/jalv_internal.h b/src/jalv_internal.h index 619be63..8b41581 100644 --- a/src/jalv_internal.h +++ b/src/jalv_internal.h @@ -164,6 +164,7 @@ typedef struct { LV2_URID_Map map; ///< URI => Int map LV2_URID_Unmap unmap; ///< Int => URI map Sratom* sratom; ///< Atom serialiser + Sratom* ui_sratom; ///< Atom serialiser for UI thread Symap* symap; ///< URI map ZixSem symap_lock; ///< Lock for URI map jack_client_t* jack_client; ///< Jack client |