aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2016-10-12 17:44:53 +1300
committerPaul Adenot <[email protected]>2016-10-12 09:48:50 +0200
commitfb0f211ac2f44f2b983d2ca81fc0745dd0598f47 (patch)
tree7cd292e24b48ae5f7478ad6b6fa445194219dbac /include
parent0aea9e0438cabfe6703d587547c3a74e11380489 (diff)
downloadcubeb-fb0f211ac2f44f2b983d2ca81fc0745dd0598f47.tar.gz
cubeb-fb0f211ac2f44f2b983d2ca81fc0745dd0598f47.zip
Simplfy LOG*() macros and pass valist through to log callback.
Diffstat (limited to 'include')
-rw-r--r--include/cubeb/cubeb.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/cubeb/cubeb.h b/include/cubeb/cubeb.h
index 50976c9..449b39c 100644
--- a/include/cubeb/cubeb.h
+++ b/include/cubeb/cubeb.h
@@ -346,10 +346,8 @@ typedef void (* cubeb_device_changed_callback)(void * user_ptr);
typedef void (* cubeb_device_collection_changed_callback)(cubeb * context,
void * user_ptr);
-/**
- * User supplied callback called when a message needs logging.
- * @param msg A c-string that contains the message to log. */
-typedef void (*cubeb_log_callback)(const char * msg);
+/** User supplied callback called when a message needs logging. */
+typedef void (* cubeb_log_callback)(const char * fmt, ...);
/** Initialize an application context. This will perform any library or
application scoped initialization.
@@ -568,9 +566,7 @@ CUBEB_EXPORT int cubeb_register_device_collection_changed(cubeb * context,
/** Set a callback to be called with a message.
@param log_level CUBEB_LOG_VERBOSE, CUBEB_LOG_NORMAL.
@param log_callback A function called with a message when there is
- something to log. Passing stdout or stderr log to
- this fd instead. Passing NULL allows unregistering a
- function.
+ something to log. Pass NULL to unregister.
@retval CUBEB_OK in case of success.
@retval CUBEB_ERROR_INVALID_PARAMETER if either context or log_callback are
invalid pointers, or if level is not