diff options
author | David Robillard <d@drobilla.net> | 2012-02-08 04:56:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-02-08 04:56:24 +0000 |
commit | ed78bbe5ba12be1f9bcc736f14c51da6b4f639f3 (patch) | |
tree | 653a2dfe33f3923da45a38fc04ed2106f93528f3 /lv2/ns/ext/osc/lv2_osc_test.c | |
parent | b617875c6f3ad439d25ae166da79df839ebfdc71 (diff) | |
download | lv2-ed78bbe5ba12be1f9bcc736f14c51da6b4f639f3.tar.xz |
Rearrange tree so top level can be used as an include path for standard style LV2 includes.
Diffstat (limited to 'lv2/ns/ext/osc/lv2_osc_test.c')
-rw-r--r-- | lv2/ns/ext/osc/lv2_osc_test.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/lv2/ns/ext/osc/lv2_osc_test.c b/lv2/ns/ext/osc/lv2_osc_test.c deleted file mode 100644 index 3f76d41..0000000 --- a/lv2/ns/ext/osc/lv2_osc_test.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <assert.h> -#include <string.h> -#include <stdio.h> -#include <lo/lo.h> -#include "lv2_osc.h" -#include "lv2_osc_print.h" - -int -main() -{ - lo_message lo_msg = lo_message_new(); - //lo_message_add_symbol(lo_msg, "a_sym"); - lo_message_add_string(lo_msg, "Hello World"); - lo_message_add_char(lo_msg, 'a'); - lo_message_add_int32(lo_msg, 1234); - lo_message_add_float(lo_msg, 0.1234); - lo_message_add_int64(lo_msg, 5678); - lo_message_add_double(lo_msg, 0.5678); - - - /*unsigned char blob_data[] = { 0,1,2,3,4,5,6,7,8,9 }; - lo_blob blob = lo_blob_new(10, blob_data); - lo_message_add_blob(lo_msg, blob);*/ - - /* Leaks like a sieve */ - - size_t raw_msg_size = 0; - void* raw_msg = lo_message_serialise(lo_msg, "/foo/bar", NULL, &raw_msg_size); - - LV2Message* msg = lv2_osc_message_from_raw(0.0, 0, NULL, raw_msg_size, raw_msg); - assert(msg); - - LV2OSCBuffer* buf = lv2_osc_buffer_new(1024); - - int ret = lv2_osc_buffer_append_message(buf, msg); - if (ret) - fprintf(stderr, "Message append failed: %s", strerror(ret)); - - lo_message lo_msg_2 = lo_message_new(); - lo_message_add_string(lo_msg_2, "Another message"); - - raw_msg = lo_message_serialise(lo_msg_2, "/baz", NULL, &raw_msg_size); - - msg = lv2_osc_message_from_raw(0.0, 0, NULL, raw_msg_size, raw_msg); - assert(msg); - - ret = lv2_osc_buffer_append_message(buf, msg); - if (ret) - fprintf(stderr, "Message append failed: %s", strerror(ret)); - - printf("\nBuffer contents:\n\n"); - lv2_osc_buffer_print(buf); - - return 0; -} |