diff options
author | Paul Adenot <[email protected]> | 2022-12-13 19:33:23 +0100 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2022-12-14 18:33:27 +0100 |
commit | cfcd4f3c420118c7e9388bab03b82e15777d96d6 (patch) | |
tree | b711d0f98c3fb09055fec730506216abd533d096 | |
parent | 304ef97245244e98cf8e3324eb348d9c01717f59 (diff) | |
download | cubeb-cfcd4f3c420118c7e9388bab03b82e15777d96d6.tar.gz cubeb-cfcd4f3c420118c7e9388bab03b82e15777d96d6.zip |
Allow directly logging from cubeb_aaudio.cpp to logcat
-rw-r--r-- | src/cubeb_aaudio.cpp | 13 |
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 |