audio_processing: Now records mic volume level also when using new AGC

Previously only mic level calculated by the legacy agc was logged in aecdebug dumps.
Now we log it for any agc.
In addition, it is now possible to turn on and off debug recording in the test tool voe_cmd_test.

BUG=4274
TESTED=verified using voe_cmd_test
R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/39839004

Cr-Commit-Position: refs/heads/master@{#8274}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8274 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
bjornv@webrtc.org 2015-02-06 19:44:21 +00:00
parent ccd7e99f0a
commit 63da1dd972
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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);