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

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

Issue 2090583002: New module for the adaptive level controlling functionality in the audio processing module (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Temporarily deactivated the level controller until the CL with the proper tuning has been landed Created 4 years, 6 months 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
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_;

Powered by Google App Engine
This is Rietveld 408576698