aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cubeb_aaudio.cpp
diff options
context:
space:
mode:
authorPaul Adenot <[email protected]>2022-12-13 19:33:23 +0100
committerPaul Adenot <[email protected]>2022-12-14 18:33:27 +0100
commitcfcd4f3c420118c7e9388bab03b82e15777d96d6 (patch)
treeb711d0f98c3fb09055fec730506216abd533d096 /src/cubeb_aaudio.cpp
parent304ef97245244e98cf8e3324eb348d9c01717f59 (diff)
downloadcubeb-cfcd4f3c420118c7e9388bab03b82e15777d96d6.tar.gz
cubeb-cfcd4f3c420118c7e9388bab03b82e15777d96d6.zip
Allow directly logging from cubeb_aaudio.cpp to logcat
Diffstat (limited to 'src/cubeb_aaudio.cpp')
-rw-r--r--src/cubeb_aaudio.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/cubeb_aaudio.cpp b/src/cubeb_aaudio.cpp
index 2ac67c2..7429354 100644
--- a/src/cubeb_aaudio.cpp
+++ b/src/cubeb_aaudio.cpp
@@ -21,6 +21,19 @@
#include <thread>
#include <time.h>
+#if defined(__ANDROID__)
+#ifdef LOG
+#undef LOG
+#endif
+// #define LOGGING_ENABLED
+#ifdef LOGGING_ENABLED
+#define LOG(args...) \
+ __android_log_print(ANDROID_LOG_INFO, "Cubeb_AAudio", ##args)
+#else
+#define LOG(...)
+#endif
+#endif
+
#ifdef DISABLE_LIBAAUDIO_DLOPEN
#define WRAP(x) x
#else