APM: Removing the redundant VAD output from the integer API
This CL removes the redundant VAD output from the newly introduced integer API in AudioProcessing. Bug: webrtc:5298 Change-Id: Iad2b1b97ada7f4863139655526c110e326c6788a Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170824 Commit-Queue: Per Åhgren <peah@webrtc.org> Reviewed-by: Sam Zackrisson <saza@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30832}
This commit is contained in:
@ -26,17 +26,15 @@ int ProcessAudioFrame(AudioProcessing* ap, AudioFrame* frame) {
|
||||
/*has_keyboard=*/false);
|
||||
RTC_DCHECK_EQ(frame->samples_per_channel(), input_config.num_frames());
|
||||
|
||||
AudioProcessing::VoiceDetectionResult vad_result =
|
||||
AudioProcessing::VoiceDetectionResult::kNotAvailable;
|
||||
|
||||
int result = ap->ProcessStream(frame->data(), input_config, output_config,
|
||||
frame->mutable_data(), &vad_result);
|
||||
frame->mutable_data());
|
||||
|
||||
if (vad_result != AudioProcessing::VoiceDetectionResult::kNotAvailable) {
|
||||
frame->vad_activity_ =
|
||||
vad_result == AudioProcessing::VoiceDetectionResult::kDetected
|
||||
? AudioFrame::VADActivity::kVadActive
|
||||
: AudioFrame::VADActivity::kVadPassive;
|
||||
AudioProcessingStats stats = ap->GetStatistics();
|
||||
|
||||
if (stats.voice_detected) {
|
||||
frame->vad_activity_ = *stats.voice_detected
|
||||
? AudioFrame::VADActivity::kVadActive
|
||||
: AudioFrame::VADActivity::kVadPassive;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user