Fix constness of AudioBuffer accessors.

Don't return non-const pointers from const accessors and deal with the
spillover. Provide overloaded versions as needed.

Inspired by kwiberg:
https://webrtc-codereview.appspot.com/12379005/

R=bjornv@webrtc.org, kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6030 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org
2014-04-30 16:44:13 +00:00
parent 740e6b339a
commit 65f933899b
12 changed files with 64 additions and 46 deletions

View File

@@ -59,7 +59,7 @@ int GainControlImpl::ProcessRenderAudio(AudioBuffer* audio) {
assert(audio->samples_per_split_channel() <= 160);
int16_t* mixed_data = audio->low_pass_split_data(0);
const int16_t* mixed_data = audio->low_pass_split_data(0);
if (audio->num_channels() > 1) {
audio->CopyAndMixLowPass(1);
mixed_data = audio->mixed_low_pass_data(0);