AGC: Removing unnneccessary copying and changing to using const

The changes have been shown to be bitexact on a large dataset.

Bug: webrtc:10859
Change-Id: Iedc0e9e944ebfabb717dd7fb4d2682c695da883e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/159694
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Commit-Queue: Per Åhgren <peah@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29883}
This commit is contained in:
Per Åhgren
2019-11-22 18:22:04 +01:00
committed by Commit Bot
parent 2f74d5f793
commit e35b32c29f
10 changed files with 43 additions and 47 deletions

View File

@ -36,12 +36,12 @@ class GainControlImpl : public GainControl {
~GainControlImpl() override;
void ProcessRenderAudio(rtc::ArrayView<const int16_t> packed_render_audio);
int AnalyzeCaptureAudio(AudioBuffer* audio);
int AnalyzeCaptureAudio(const AudioBuffer& audio);
int ProcessCaptureAudio(AudioBuffer* audio, bool stream_has_echo);
void Initialize(size_t num_proc_channels, int sample_rate_hz);
static void PackRenderAudioBuffer(AudioBuffer* audio,
static void PackRenderAudioBuffer(const AudioBuffer& audio,
std::vector<int16_t>* packed_buffer);
// GainControl implementation.