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}
diff --git a/modules/audio_processing/audio_processing_impl.cc b/modules/audio_processing/audio_processing_impl.cc
index aaf372e..ff68909 100644
--- a/modules/audio_processing/audio_processing_impl.cc
+++ b/modules/audio_processing/audio_processing_impl.cc
@@ -1015,7 +1015,7 @@
   }
 
   if (!submodules_.agc_manager) {
-    GainControlImpl::PackRenderAudioBuffer(audio, &agc_render_queue_buffer_);
+    GainControlImpl::PackRenderAudioBuffer(*audio, &agc_render_queue_buffer_);
     // Insert the samples into the queue.
     if (!agc_render_signal_queue_->Insert(&agc_render_queue_buffer_)) {
       // The data queue is full and needs to be emptied.
@@ -1298,7 +1298,7 @@
     submodules_.high_pass_filter->Process(capture_buffer);
   }
 
-  RETURN_ON_ERR(submodules_.gain_control->AnalyzeCaptureAudio(capture_buffer));
+  RETURN_ON_ERR(submodules_.gain_control->AnalyzeCaptureAudio(*capture_buffer));
   RTC_DCHECK(
       !(submodules_.legacy_noise_suppressor && submodules_.noise_suppressor));
   if (submodules_.noise_suppressor) {