Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Unified Diff: webrtc/modules/audio_processing/logging/aec_logging.h

Issue 1488613002: Added two more debug macros for logging scalar values to file. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Corrected the function call for storing the data Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_processing/logging/aec_logging.h
diff --git a/webrtc/modules/audio_processing/logging/aec_logging.h b/webrtc/modules/audio_processing/logging/aec_logging.h
index 3cf9ff89edc34f0bc674404e267c00188d44b247..b062913be28944d098caa378196f5b7d8886945d 100644
--- a/webrtc/modules/audio_processing/logging/aec_logging.h
+++ b/webrtc/modules/audio_processing/logging/aec_logging.h
@@ -43,6 +43,20 @@
(void) fwrite(data, data_size, 1, file); \
} while (0)
+// Dumps a raw scalar int32 to file.
+#define RTC_AEC_DEBUG_RAW_WRITE_SCALAR_INT32(file, data) \
+ do { \
+ int32_t value_to_store = data; \
ivoc 2015/12/01 09:47:52 Would it be possible/desirable to merge this with
peah-webrtc 2015/12/01 12:21:43 I think you are right in that it could. My only co
+ (void) fwrite(&value_to_store, sizeof(value_to_store), 1, file); \
+ } while (0)
+
+// Dumps a raw scalar double to file.
+#define RTC_AEC_DEBUG_RAW_WRITE_SCALAR_DOUBLE(file, data) \
+ do { \
+ double value_to_store = data; \
+ (void) fwrite(&value_to_store, sizeof(value_to_store), 1, file); \
+ } while (0)
+
kwiberg-webrtc 2015/11/30 14:55:43 Drive-by: Please consider using inline functions i
// Opens a raw data file for writing using the specified sample rate.
#define RTC_AEC_DEBUG_RAW_OPEN(name, instance_counter, file) \
do { \
@@ -73,6 +87,14 @@
do { \
} while (0)
+#define RTC_AEC_DEBUG_RAW_WRITE_SCALAR_INT32(file, data) \
+ do { \
+ } while (0)
+
+#define RTC_AEC_DEBUG_RAW_WRITE_SCALAR_DOUBLE(file, data) \
+ do { \
+ } while (0)
+
#define RTC_AEC_DEBUG_RAW_OPEN(file, name, instance_counter) \
do { \
} while (0)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698