aboutsummaryrefslogtreecommitdiffstats
path: root/src/jalv.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-30 17:36:38 -0400
committerDavid Robillard <d@drobilla.net>2016-07-31 03:25:52 -0400
commit005f9bf2051725a197c3b79e769214f78bb23b16 (patch)
treef9aaf848e8cee8bd49cb98952834283ac232be62 /src/jalv.c
parentc001c7bd70ea3dee1aa1447f413c0d51e8e07415 (diff)
downloadjalv-005f9bf2051725a197c3b79e769214f78bb23b16.tar.gz
jalv-005f9bf2051725a197c3b79e769214f78bb23b16.tar.bz2
jalv-005f9bf2051725a197c3b79e769214f78bb23b16.zip
Clean up log output
Diffstat (limited to 'src/jalv.c')
-rw-r--r--src/jalv.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/jalv.c b/src/jalv.c
index fa08e64..5d43691 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -1,5 +1,5 @@
/*
- Copyright 2007-2015 David Robillard <http://drobilla.net>
+ Copyright 2007-2016 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -73,6 +73,7 @@
#include "worker.h"
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+#define NS_XSD "http://www.w3.org/2001/XMLSchema#"
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
@@ -493,7 +494,9 @@ jack_process_cb(jack_nframes_t nframes, void* data)
char* str = sratom_to_turtle(
jalv->sratom, &jalv->unmap, "time:", NULL, NULL,
lv2_pos->type, lv2_pos->size, LV2_ATOM_BODY(lv2_pos));
- printf("\n## Position\n%s\n", str);
+ jalv_ansi_start(stderr, 36);
+ printf("\n## Position ##\n%s\n", str);
+ jalv_ansi_reset(stderr);
free(str);
}
}
@@ -1009,8 +1012,18 @@ main(int argc, char** argv)
lv2_atom_forge_init(&jalv.forge, &jalv.map);
+ jalv.env = serd_env_new(NULL);
+ serd_env_set_prefix_from_strings(
+ jalv.env, (const uint8_t*)"patch", (const uint8_t*)LV2_PATCH_PREFIX);
+ serd_env_set_prefix_from_strings(
+ jalv.env, (const uint8_t*)"time", (const uint8_t*)LV2_TIME_PREFIX);
+ serd_env_set_prefix_from_strings(
+ jalv.env, (const uint8_t*)"xsd", (const uint8_t*)NS_XSD);
+
jalv.sratom = sratom_new(&jalv.map);
jalv.ui_sratom = sratom_new(&jalv.map);
+ sratom_set_env(jalv.sratom, jalv.env);
+ sratom_set_env(jalv.ui_sratom, jalv.env);
jalv.midi_event_id = uri_to_id(
&jalv, "http://lv2plug.in/ns/ext/event", LV2_MIDI__MidiEvent);
@@ -1024,7 +1037,9 @@ main(int argc, char** argv)
jalv.urids.bufsz_maxBlockLength = symap_map(jalv.symap, LV2_BUF_SIZE__maxBlockLength);
jalv.urids.bufsz_minBlockLength = symap_map(jalv.symap, LV2_BUF_SIZE__minBlockLength);
jalv.urids.bufsz_sequenceSize = symap_map(jalv.symap, LV2_BUF_SIZE__sequenceSize);
+ jalv.urids.log_Error = symap_map(jalv.symap, LV2_LOG__Error);
jalv.urids.log_Trace = symap_map(jalv.symap, LV2_LOG__Trace);
+ jalv.urids.log_Warning = symap_map(jalv.symap, LV2_LOG__Warning);
jalv.urids.midi_MidiEvent = symap_map(jalv.symap, LV2_MIDI__MidiEvent);
jalv.urids.param_sampleRate = symap_map(jalv.symap, LV2_PARAMETERS__sampleRate);
jalv.urids.patch_Get = symap_map(jalv.symap, LV2_PATCH__Get);