Changeset 3986
- Timestamp:
- 2012-02-17 22:54:24 (15 months ago)
- Location:
- trunk/jalv
- Files:
-
- 1 added
- 7 edited
-
doc/jalv.1 (modified) (2 diffs)
-
src/atom_rdf.c (added)
-
src/jalv.c (modified) (6 diffs)
-
src/jalv_console.c (modified) (3 diffs)
-
src/jalv_gtk2.c (modified) (2 diffs)
-
src/jalv_internal.h (modified) (3 diffs)
-
src/symap.c (modified) (2 diffs)
-
wscript (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jalv/doc/jalv.1
r3984 r3986 1 .TH JALV "1 7 Jan2012"1 .TH JALV "18 Feb 2012" 2 2 3 3 .SH NAME … … 21 21 Load state from state directory. 22 22 23 .TP 24 \fB\-d DIR\fR 25 Dump plugin <=> UI communication. 26 23 27 .SH SEE ALSO 24 28 .BR lv2ls(1), -
trunk/jalv/src/jalv.c
r3985 r3986 1 1 /* 2 Copyright 2007-201 1David Robillard <http://drobilla.net>2 Copyright 2007-2012 David Robillard <http://drobilla.net> 3 3 4 4 Permission to use, copy, modify, and/or distribute this software for any … … 53 53 #define NS_MIDI "http://lv2plug.in/ns/ext/midi#" 54 54 #define NS_PSET "http://lv2plug.in/ns/ext/presets#" 55 55 #define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" 56 57 #define USTR(str) ((const uint8_t*)str) 58 56 59 ZixSem exit_sem; /**< Exit semaphore */ 57 60 … … 387 390 port->control = *(float*)body; 388 391 } else if (ev.protocol == host->atom_prot_id) { 389 printf("ATOM UI READ\n");390 for (uint32_t i = 0; i < ev.size; ++i) {391 printf("%c", body[i]);392 }393 printf("\n");394 392 LV2_Evbuf_Iterator i = lv2_evbuf_end(port->evbuf); 395 393 const LV2_Atom* const atom = (const LV2_Atom*)body; … … 512 510 513 511 if (protocol == host->atom_prot_id) { 514 printf("ATOM UI WRITE: %d\n", protocol);515 for (uint32_t i = 0; i < buffer_size; ++i) {516 printf("%c", ((uint8_t*)buffer)[i]);517 }518 printf("\n");512 SerdNode s = serd_node_from_string(SERD_BLANK, USTR("msg")); 513 SerdNode p = serd_node_from_string(SERD_URI, USTR(NS_RDF "value")); 514 char* str = atom_to_turtle(&host->unmap, &s, &p, (LV2_Atom*)buffer); 515 printf("\n## UI => Plugin ##\n%s\n", str); 516 free(str); 519 517 } 520 518 … … 525 523 ev->size = buffer_size; 526 524 memcpy(ev->body, buffer, buffer_size); 527 #if 0528 printf("WRITE: ");529 for (uint32_t i = 0; i < sizeof(buf); ++i) {530 printf("%c", buf[i]);531 }532 printf("\n");533 #endif534 525 jack_ringbuffer_write(host->ui_events, buf, sizeof(buf)); 535 526 } … … 544 535 char buf[ev.size]; 545 536 jack_ringbuffer_read(host->plugin_events, buf, ev.size); 537 538 if (ev.protocol == host->atom_prot_id) { 539 SerdNode s = serd_node_from_string(SERD_BLANK, USTR("msg")); 540 SerdNode p = serd_node_from_string(SERD_URI, USTR(NS_RDF "value")); 541 char* str = atom_to_turtle(&host->unmap, &s, &p, (LV2_Atom*)buf); 542 printf("\n## Plugin => UI ##\n%s\n", str); 543 free(str); 544 } 545 546 546 suil_instance_port_event(host->ui_instance, ev.index, 547 547 ev.size, ev.protocol, buf); -
trunk/jalv/src/jalv_console.c
r3978 r3986 1 1 /* 2 Copyright 2007-201 1David Robillard <http://drobilla.net>2 Copyright 2007-2012 David Robillard <http://drobilla.net> 3 3 4 4 Permission to use, copy, modify, and/or distribute this software for any … … 31 31 fprintf(os, " -u UUID UUID for Jack session restoration\n"); 32 32 fprintf(os, " -l DIR Load state from save directory\n"); 33 fprintf(os, " -d DIR Dump plugin <=> UI communication\n"); 33 34 return error ? 1 : 0; 34 35 } … … 59 60 } 60 61 opts->load = jalv_strdup((*argv)[a]); 62 } else if ((*argv)[a][1] == 'd') { 63 opts->dump = true; 61 64 } else { 62 65 fprintf(stderr, "Unknown option %s\n", (*argv)[a]); -
trunk/jalv/src/jalv_gtk2.c
r3978 r3986 1 1 /* 2 Copyright 2007-201 1David Robillard <http://drobilla.net>2 Copyright 2007-2012 David Robillard <http://drobilla.net> 3 3 4 4 Permission to use, copy, modify, and/or distribute this software for any … … 37 37 { "load", 'l', 0, G_OPTION_ARG_STRING, &opts->load, 38 38 "Load state from save directory", "DIR" }, 39 { "dump", 'd', 0, G_OPTION_ARG_NONE, &opts->dump, 40 "Dump plugin <=> UI communication", NULL }, 39 41 { 0, 0, 0, 0, 0, 0, 0 } }; 40 42 GError* error = NULL; -
trunk/jalv/src/jalv_internal.h
r3978 r3986 28 28 #include "suil/suil.h" 29 29 30 #include "lv2/lv2plug.in/ns/ext/atom/atom.h" 30 31 #include "lv2/lv2plug.in/ns/ext/urid/urid.h" 31 32 #include "lv2/lv2plug.in/ns/ext/state/state.h" … … 79 80 char* uuid; 80 81 char* load; 82 bool dump; 81 83 } JalvOptions; 82 84 … … 190 192 jalv_apply_state(Jalv* jalv, LilvState* state); 191 193 194 char* 195 atom_to_turtle(LV2_URID_Unmap* unmap, 196 const SerdNode* subject, 197 const SerdNode* predicate, 198 const LV2_Atom* atom); 199 192 200 static inline char* 193 201 jalv_strdup(const char* str) -
trunk/jalv/src/symap.c
r3949 r3986 1 1 /* 2 Copyright 2011 David Robillard <http://drobilla.net>2 Copyright 2011-2012 David Robillard <http://drobilla.net> 3 3 4 4 Permission to use, copy, modify, and/or distribute this software for any … … 173 173 symap_unmap(Symap* map, uint32_t id) 174 174 { 175 if (id <= map->size) { 175 if (id == 0) { 176 return NULL; 177 } else if (id <= map->size) { 176 178 return map->symbols[id - 1]; 177 179 } -
trunk/jalv/wscript
r3981 r3986 84 84 libs = 'LILV SUIL JACK SERD LV2CORE LV2_EVENT LV2_ATOM LV2_URI_MAP LV2_STATE' 85 85 86 source = 'src/jalv.c src/symap.c src/state.c src/lv2_evbuf.c '86 source = 'src/jalv.c src/symap.c src/state.c src/lv2_evbuf.c src/atom_rdf.c' 87 87 88 88 # Non-GUI version
Note: See TracChangeset
for help on using the changeset viewer.
