diff options
author | Paul Adenot <[email protected]> | 2023-08-17 17:10:45 +0200 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2023-08-25 20:09:58 +0200 |
commit | 13872fb5f178612b464d940b2feca75f478afc2a (patch) | |
tree | 878a361c4dc09103eb87880e0077e9f645d09af3 | |
parent | 33ade008b5befa3a56871e61078d5a5d923bcbf8 (diff) | |
download | cubeb-13872fb5f178612b464d940b2feca75f478afc2a.tar.gz cubeb-13872fb5f178612b464d940b2feca75f478afc2a.zip |
OpenSLES: use cubeb logging facilities
-rw-r--r-- | src/cubeb_opensl.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/cubeb_opensl.cpp b/src/cubeb_opensl.cpp index d44f86c..4fdd187 100644 --- a/src/cubeb_opensl.cpp +++ b/src/cubeb_opensl.cpp @@ -28,48 +28,11 @@ #include "cubeb_array_queue.h" #include "cubeb_resampler.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_OpenSL", ##args) -#else -#define LOG(...) -#endif - -// #define TIMESTAMP_ENABLED -#ifdef TIMESTAMP_ENABLED -#define FILENAME \ - (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) -#define LOG_TS(args...) \ - __android_log_print(ANDROID_LOG_INFO, "Cubeb_OpenSL ES: Timestamp(usec)", \ - ##args) -#define TIMESTAMP(msg) \ - do { \ - struct timeval timestamp; \ - int ts_ret = gettimeofday(×tamp, NULL); \ - if (ts_ret == 0) { \ - LOG_TS("%lld: %s (%s %s:%d)", \ - timestamp.tv_sec * 1000000LL + timestamp.tv_usec, msg, \ - __FUNCTION__, FILENAME, __LINE__); \ - } else { \ - LOG_TS("Error: %s (%s %s:%d) - %s", msg, __FUNCTION__, FILENAME, \ - __LINE__); \ - } \ - } while (0) -#else -#define TIMESTAMP(...) -#endif - #define ANDROID_VERSION_GINGERBREAD_MR1 10 #define ANDROID_VERSION_JELLY_BEAN 18 #define ANDROID_VERSION_LOLLIPOP 21 #define ANDROID_VERSION_MARSHMALLOW 23 #define ANDROID_VERSION_N_MR1 25 -#endif #define DEFAULT_SAMPLE_RATE 48000 #define DEFAULT_NUM_OF_FRAMES 480 @@ -516,7 +479,6 @@ recorder_fullduplex_callback(SLAndroidSimpleBufferQueueItf bq, void * context) static void player_fullduplex_callback(SLBufferQueueItf caller, void * user_ptr) { - TIMESTAMP("ENTER"); cubeb_stream * stm = static_cast<cubeb_stream*>(user_ptr); assert(stm); SLresult res; @@ -614,7 +576,6 @@ player_fullduplex_callback(SLBufferQueueItf caller, void * user_ptr) // Enqueue data in player buffer queue res = (*stm->bufq)->Enqueue(stm->bufq, output_buffer, stm->queuebuf_len); assert(res == SL_RESULT_SUCCESS); - TIMESTAMP("EXIT"); } static void |