Skip to content

Commit

Permalink
SendDataCBlocking fixes and add to examples list.
Browse files Browse the repository at this point in the history
  • Loading branch information
cboulay committed Jun 13, 2022
1 parent 9e1fc3c commit 90c35a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ addlslexample(SendMultipleStreams cpp)
addlslexample(SendStringMarkers cpp)
addlslexample(SendStringMarkersC c)
addlslexample(TestSyncWithoutData cpp)
addlslexample(SendDataCBlocking c)

target_link_libraries(TestSyncWithoutData PRIVATE Threads::Threads)

4 changes: 2 additions & 2 deletions examples/SendDataCBlocking.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ void transmit_thread(void *vargp) {
lsl_xml_ptr desc = lsl_get_desc(info);
lsl_append_child_value(desc, "manufacturer", "LSL");
lsl_xml_ptr chns = lsl_append_child(desc, "channels");
char chanlabel[12];
char chanlabel[20];
for (int c = 0; c < device->nchans; c++) {
lsl_xml_ptr chn = lsl_append_child(chns, "channel");
snprintf(chanlabel, 20, "Chan-%d", c);
Expand All @@ -150,7 +150,7 @@ void transmit_thread(void *vargp) {

/* make a new outlet */
lsl_outlet outlet =
lsl_create_outlet_d(info, params->chunk_size, params->buffer_dur, params->do_async);
lsl_create_outlet_ex(info, params->chunk_size, params->buffer_dur, params->do_async ? transp_sync_blocking : 0);

printf("Now sending data...\n");
params->thread_status = 1;
Expand Down

0 comments on commit 90c35a8

Please sign in to comment.