diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc index 7eeda111a1..1319e16962 100644 --- a/webrtc/modules/audio_processing/audio_processing_impl.cc +++ b/webrtc/modules/audio_processing/audio_processing_impl.cc @@ -591,7 +591,7 @@ int AudioProcessingImpl::ProcessStreamLocked() { audioproc::Stream* msg = event_msg_->mutable_stream(); msg->set_delay(stream_delay_ms_); msg->set_drift(echo_cancellation_->stream_drift_samples()); - msg->set_level(gain_control_->stream_analog_level()); + msg->set_level(gain_control()->stream_analog_level()); msg->set_keypress(key_pressed_); } #endif diff --git a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc index 1155234b7b..454baffd28 100644 --- a/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc +++ b/webrtc/voice_engine/test/cmd_test/voe_cmd_test.cc @@ -233,6 +233,7 @@ void RunTest(std::string out_path) { bool muted = false; bool opus_stereo = false; bool experimental_ns_enabled = false; + bool debug_recording_started = false; #if defined(WEBRTC_ANDROID) std::string resource_path = "/sdcard/"; @@ -448,6 +449,7 @@ void RunTest(std::string out_path) { printf("%i. Set Opus maximum playback rate \n", option_index++); printf("%i. Set bit rate (only take effect on codecs that allow the " "change) \n", option_index++); + printf("%i. Toggle debug recording \n", option_index++); printf("Select action or %i to stop the call: ", option_index); int option_selection; @@ -778,11 +780,25 @@ void RunTest(std::string out_path) { ASSERT_EQ(1, scanf("%i", &cinst.rate)); res = codec->SetSendCodec(chan, cinst); VALIDATE; + } else if (option_selection == option_index++) { + const char* kDebugFileName = "audio.aecdump"; + if (debug_recording_started) { + apm->StopDebugRecording(); + printf("Debug recording named %s stopped\n", kDebugFileName); + } else { + apm->StartDebugRecording(kDebugFileName); + printf("Debug recording named %s started\n", kDebugFileName); + } + debug_recording_started = !debug_recording_started; } else { break; } } + if (debug_recording_started) { + apm->StopDebugRecording(); + } + if (send) { printf("Stop Send \n"); res = base1->StopSend(chan);