Remove all AudioBuffer code that is not related to storing audio data
This CL moves/removes all code from the AudioBuffer that:
-Is not directly handling audio data (e.g., keytaps, VAD descisions).
-Is caching aggregated versions of the rest of the audio data.
-Is not used (or only used in testing)
Bug: webrtc:10882
Change-Id: I737deb3f692748eff30f46ad806b2c6f6292802c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149072
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28866}
diff --git a/modules/audio_processing/voice_detection_impl.h b/modules/audio_processing/voice_detection_impl.h
index 4007f67..7ee303f 100644
--- a/modules/audio_processing/voice_detection_impl.h
+++ b/modules/audio_processing/voice_detection_impl.h
@@ -31,7 +31,14 @@
// TODO(peah): Fold into ctor, once public API is removed.
void Initialize(int sample_rate_hz);
- void ProcessCaptureAudio(AudioBuffer* audio);
+
+ // Returns the VAD activity.
+ bool ProcessCaptureAudio(AudioBuffer* audio);
+
+ bool using_external_vad() const {
+ rtc::CritScope cs(crit_);
+ return using_external_vad_;
+ }
// VoiceDetection implementation.
int Enable(bool enable) override;