From cfcd4f3c420118c7e9388bab03b82e15777d96d6 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Tue, 13 Dec 2022 19:33:23 +0100 Subject: Allow directly logging from cubeb_aaudio.cpp to logcat --- src/cubeb_aaudio.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/cubeb_aaudio.cpp') 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 #include +#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 -- cgit v1.2.3