Index: webrtc/modules/audio_processing/logging/apm_data_dumper.h |
diff --git a/webrtc/modules/audio_processing/logging/apm_data_dumper.h b/webrtc/modules/audio_processing/logging/apm_data_dumper.h |
index 93232b7c9dc44b6add54730b9c59181cc6d96279..eb3ee881a6446dd08bd9fe0086d298a0a72eff18 100644 |
--- a/webrtc/modules/audio_processing/logging/apm_data_dumper.h |
+++ b/webrtc/modules/audio_processing/logging/apm_data_dumper.h |
@@ -73,6 +73,22 @@ class ApmDataDumper { |
#endif |
} |
+ void DumpRaw(const char* name, int v_length, const bool* v) { |
+#if WEBRTC_AEC_DEBUG_DUMP == 1 |
+ FILE* file = GetRawFile(name); |
+ for (int k = 0; k < v_length; ++k) { |
+ int16_t value = static_cast<int16_t>(v[k]); |
+ fwrite(&value, sizeof(value), 1, file); |
+ } |
+#endif |
+ } |
+ |
+ void DumpRaw(const char* name, rtc::ArrayView<const bool> v) { |
+#if WEBRTC_AEC_DEBUG_DUMP == 1 |
+ DumpRaw(name, v.size(), v.data()); |
+#endif |
+ } |
+ |
void DumpRaw(const char* name, int v_length, const int16_t* v) { |
#if WEBRTC_AEC_DEBUG_DUMP == 1 |
FILE* file = GetRawFile(name); |
@@ -110,6 +126,15 @@ class ApmDataDumper { |
#endif |
} |
+ void DumpWav(const char* name, |
+ rtc::ArrayView<const float> v, |
+ int sample_rate_hz, |
+ int num_channels) { |
+#if WEBRTC_AEC_DEBUG_DUMP == 1 |
+ DumpWav(name, v.size(), v.data(), sample_rate_hz, num_channels); |
+#endif |
+ } |
+ |
private: |
#if WEBRTC_AEC_DEBUG_DUMP == 1 |
const int instance_index_; |