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

Unified Diff: webrtc/modules/audio_processing/test/wav_based_simulator.cc

Issue 2834643002: audioproc_f with simulated mic analog gain (Closed)
Patch Set: comments addressed Created 3 years, 8 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/wav_based_simulator.cc
diff --git a/webrtc/modules/audio_processing/test/wav_based_simulator.cc b/webrtc/modules/audio_processing/test/wav_based_simulator.cc
index 6cf0b744e6f5c040c81f7b8798e0992008c96b63..fc03341e1d46a3bdc5c5112633226d867156bda6 100644
--- a/webrtc/modules/audio_processing/test/wav_based_simulator.cc
+++ b/webrtc/modules/audio_processing/test/wav_based_simulator.cc
@@ -12,6 +12,8 @@
#include <stdio.h>
#include <iostream>
+#include <memory>
+#include <utility>
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_processing/test/test_utils.h"
@@ -82,7 +84,9 @@ void WavBasedSimulator::PrepareProcessStreamCall() {
RTC_CHECK_EQ(AudioProcessing::kNoError,
ap_->gain_control()->set_stream_analog_level(
- last_specified_microphone_level_));
+ last_specified_microphone_level_));
+ // TODO(aleloi): No undo level to set, i.e., no call to
peah-webrtc 2017/05/02 21:27:33 Is this todo really needed? It is a todo about not
+ // FakeRecordingDevice::NotifyAudioDeviceLevel().
}
void WavBasedSimulator::PrepareReverseProcessStreamCall() {
@@ -143,10 +147,12 @@ bool WavBasedSimulator::HandleProcessStreamCall() {
if (samples_left_to_process) {
PrepareProcessStreamCall();
ProcessStream(settings_.fixed_interface);
- // Call stream analog level to ensure that any side-effects are triggered.
- (void)ap_->gain_control()->stream_analog_level();
last_specified_microphone_level_ =
ap_->gain_control()->stream_analog_level();
+ // TODO(aleloi): If settings_.simulate_mic_gain, set the returned value into
peah-webrtc 2017/05/02 21:27:33 This makes sense. What about putting that into Aud
+ // a FakeRecordingDevice instance via
+ // FakeRecordingDevice::set_analog_level() instead of using
+ // last_specified_microphone_level_.
}
return samples_left_to_process;
}

Powered by Google App Engine
This is Rietveld 408576698