Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tinyosc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

#include <stddef.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#if _WIN32
Expand Down Expand Up @@ -173,7 +172,7 @@ void tosc_writeBundle(tosc_bundle *b, uint64_t timetag, char *buffer, const int
}

// always writes a multiple of 4 bytes
static uint32_t tosc_vwrite(char *buffer, const int len,
uint32_t tosc_vwrite(char *buffer, const int len,
const char *address, const char *format, va_list ap) {
memset(buffer, 0, len); // clear the buffer
uint32_t i = (uint32_t) strlen(address);
Expand Down
7 changes: 7 additions & 0 deletions tinyosc.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <stdbool.h>
#include <stdint.h>
#include <stdarg.h>

#define TINYOSC_TIMETAG_IMMEDIATELY 1L

Expand Down Expand Up @@ -160,6 +161,12 @@ uint32_t tosc_getBundleLength(tosc_bundle *b);
uint32_t tosc_writeMessage(char *buffer, const int len, const char *address,
const char *fmt, ...);

/**
* Like tosc_writeMessage, but allows passing in a va_list directly.
*/
uint32_t tosc_vwrite(char *buffer, const int len,
const char *address, const char *format, va_list ap);

/**
* A convenience function to (non-destructively) print a buffer containing
* an OSC message to stdout.
Expand Down