Add accessors for array of channel pointers in AudioBuffer. They are
needed as arguments to any multichannel audio processing unit.

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7303 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_processing/audio_buffer.cc b/webrtc/modules/audio_processing/audio_buffer.cc
index 2bbd771..8aff61c 100644
--- a/webrtc/modules/audio_processing/audio_buffer.cc
+++ b/webrtc/modules/audio_processing/audio_buffer.cc
@@ -289,6 +289,15 @@
   return channels_->fbuf()->channel(channel);
 }
 
+const float* const* AudioBuffer::channels_f() const {
+  return channels_->fbuf_const()->channels();
+}
+
+float* const* AudioBuffer::channels_f() {
+  mixed_low_pass_valid_ = false;
+  return channels_->fbuf()->channels();
+}
+
 const int16_t* AudioBuffer::low_pass_split_data(int channel) const {
   return split_channels_low_.get()
       ? split_channels_low_->ibuf_const()->channel(channel)
@@ -315,6 +324,19 @@
       : data_f(channel);
 }
 
+const float* const* AudioBuffer::low_pass_split_channels_f() const {
+  return split_channels_low_.get()
+      ? split_channels_low_->fbuf_const()->channels()
+      : channels_f();
+}
+
+float* const* AudioBuffer::low_pass_split_channels_f() {
+  mixed_low_pass_valid_ = false;
+  return split_channels_low_.get()
+      ? split_channels_low_->fbuf()->channels()
+      : channels_f();
+}
+
 const int16_t* AudioBuffer::high_pass_split_data(int channel) const {
   return split_channels_high_.get()
       ? split_channels_high_->ibuf_const()->channel(channel)
@@ -339,6 +361,18 @@
       : NULL;
 }
 
+const float* const* AudioBuffer::high_pass_split_channels_f() const {
+  return split_channels_high_.get()
+      ? split_channels_high_->fbuf_const()->channels()
+      : NULL;
+}
+
+float* const* AudioBuffer::high_pass_split_channels_f() {
+  return split_channels_high_.get()
+      ? split_channels_high_->fbuf()->channels()
+      : NULL;
+}
+
 const int16_t* AudioBuffer::mixed_low_pass_data() {
   // Currently only mixing stereo to mono is supported.
   assert(num_proc_channels_ == 1 || num_proc_channels_ == 2);