aboutsummaryrefslogtreecommitdiffhomepage
path: root/midimonster.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-22 13:19:37 +0100
committercbdev <cb@cbcdn.com>2019-12-22 13:19:37 +0100
commita305f5d9b2794315fb536dbe4d4949f1cf26aeea (patch)
tree1e9180b69347396a0f71e2ca1fb3488c16a01c45 /midimonster.h
parentb5d5f26835ea8840fc3aedd38780f3025d2959b3 (diff)
parent172d8a210f7df36a26b01d2fe018ff4c959a6987 (diff)
downloadmidimonster-a305f5d9b2794315fb536dbe4d4949f1cf26aeea.tar.gz
midimonster-a305f5d9b2794315fb536dbe4d4949f1cf26aeea.tar.bz2
midimonster-a305f5d9b2794315fb536dbe4d4949f1cf26aeea.zip
Merge branch 'master' into rtpmidi
Diffstat (limited to 'midimonster.h')
-rw-r--r--midimonster.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/midimonster.h b/midimonster.h
index 1f5c936..5844bb9 100644
--- a/midimonster.h
+++ b/midimonster.h
@@ -10,6 +10,11 @@
#define MIDIMONSTER_VERSION "v0.3-dist"
#endif
+/* Set backend name if unset */
+#ifndef BACKEND_NAME
+ #define BACKEND_NAME "unspec"
+#endif
+
/* API call attributes and visibilities */
#ifndef MM_API
#ifdef _WIN32
@@ -37,13 +42,15 @@
/* Debug messages only compile in when DEBUG is set */
#ifdef DEBUG
- #define DBGPF(format, ...) fprintf(stderr, (format), __VA_ARGS__)
- #define DBG(message) fprintf(stderr, "%s", (message))
+ #define DBGPF(format, ...) fprintf(stderr, "debug/%s\t" format "\n", (BACKEND_NAME), __VA_ARGS__)
#else
#define DBGPF(format, ...)
- #define DBG(message)
#endif
+/* Log messages should be routed through these macros to ensure interoperability with different core implementations */
+#define LOGPF(format, ...) fprintf(stderr, "%s\t" format "\n", (BACKEND_NAME), __VA_ARGS__)
+#define LOG(message) fprintf(stderr, "%s\t%s\n", (BACKEND_NAME), (message))
+
/* Stop compilation if the build system reports an error */
#ifdef BUILD_ERROR
#error The build system reported an error, compilation stopped. Refer to the invocation for this compilation unit for more information.
@@ -92,7 +99,7 @@ struct _managed_fd;
* Parse instance configuration from the user-supplied configuration
* file. Returning a non-zero value fails config parsing.
* * mmbackend_channel
- * Parse a channel-spec to be mapped to/from. The `falgs` parameter supplies
+ * Parse a channel-spec to be mapped to/from. The `flags` parameter supplies
* additional information to the parser, such as whether the channel is being
* queried for use as input (to the MIDIMonster core) and/or output
* (from the MIDIMonster core) channel (on a per-query basis).