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

Unified Diff: webrtc/modules/audio_processing/test/audio_processing_simulator.h

Issue 2834643002: audioproc_f with simulated mic analog gain (Closed)
Patch Set: FakeRecordingDevice interface simplified, UTs fixes, logs verbosity-- Created 3 years, 7 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/test/audio_processing_simulator.h
diff --git a/webrtc/modules/audio_processing/test/audio_processing_simulator.h b/webrtc/modules/audio_processing/test/audio_processing_simulator.h
index f597fa101a76e7a1a705464957458308fb1b0f81..2893f3aa899ff4ce815a289b8ab739797f524a3a 100644
--- a/webrtc/modules/audio_processing/test/audio_processing_simulator.h
+++ b/webrtc/modules/audio_processing/test/audio_processing_simulator.h
@@ -17,11 +17,12 @@
#include <memory>
#include <string>
-#include "webrtc/base/timeutils.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/optional.h"
+#include "webrtc/base/timeutils.h"
#include "webrtc/common_audio/channel_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
+#include "webrtc/modules/audio_processing/test/fake_recording_device.h"
#include "webrtc/modules/audio_processing/test/test_utils.h"
namespace webrtc {
@@ -74,6 +75,9 @@ struct SimulationSettings {
rtc::Optional<int> vad_likelihood;
rtc::Optional<int> ns_level;
rtc::Optional<bool> use_refined_adaptive_filter;
+ int initial_mic_gain;
+ bool simulate_mic_gain = false;
+ rtc::Optional<int> simulated_mic_kind;
aleloi 2017/05/08 10:15:23 I suggest convert to FakeRecordingDevice::LevelToS
peah-webrtc 2017/05/08 11:41:33 That makes sense, but the code storing the command
aleloi 2017/05/08 12:40:49 Ok, I didn't look close enough.
AleBzk 2017/05/16 08:53:03 If I understand well, it's fine as it is now since
bool report_performance = false;
bool report_bitexactness = false;
bool use_verbose_logging = false;
@@ -164,6 +168,9 @@ class AudioProcessingSimulator {
AudioFrame rev_frame_;
AudioFrame fwd_frame_;
bool bitexact_output_ = true;
+ int last_specified_microphone_level_;
+ int real_recording_device_level_ =
+ FakeRecordingDevice::kRealDeviceLevelUnknown;
private:
void SetupOutput();
@@ -175,6 +182,7 @@ class AudioProcessingSimulator {
std::unique_ptr<ChannelBufferWavWriter> reverse_buffer_writer_;
TickIntervalStats proc_time_;
std::ofstream residual_echo_likelihood_graph_writer_;
+ FakeRecordingDevice fake_recording_device_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioProcessingSimulator);
};

Powered by Google App Engine
This is Rietveld 408576698