cubeb-core 0.34.1

Common types and definitions for cubeb rust and C bindings. Not intended for direct use.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdarg.h>
#include <stdio.h>

/** The maximum size of a log message, after having been formatted. */
#define CUBEB_LOG_MESSAGE_MAX_SIZE 256

void RUST_WRITE_FORMATTED_MSG(char* msg);

void cubeb_write_log(char const * fmt, ...) {
  va_list args;
  va_start(args, fmt);
  char msg[CUBEB_LOG_MESSAGE_MAX_SIZE];
  vsnprintf(msg, CUBEB_LOG_MESSAGE_MAX_SIZE, fmt, args);
  va_end(args);
  RUST_WRITE_FORMATTED_MSG(msg);
}