Simplify AudioBuffer::mixed_low_pass_data API

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

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6715 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_processing/audio_buffer.h b/webrtc/modules/audio_processing/audio_buffer.h
index db24e95..6b1a46f 100644
--- a/webrtc/modules/audio_processing/audio_buffer.h
+++ b/webrtc/modules/audio_processing/audio_buffer.h
@@ -63,8 +63,9 @@
   const int16_t* low_pass_split_data(int channel) const;
   int16_t* high_pass_split_data(int channel);
   const int16_t* high_pass_split_data(int channel) const;
-  const int16_t* mixed_data(int channel) const;
-  const int16_t* mixed_low_pass_data(int channel) const;
+  // Returns a pointer to the low-pass data downmixed to mono. If this data
+  // isn't already available it re-calculates it.
+  const int16_t* mixed_low_pass_data();
   const int16_t* low_pass_reference(int channel) const;
 
   // Float versions of the accessors, with automatic conversion back and forth
@@ -85,7 +86,6 @@
 
   // Use for int16 interleaved data.
   void DeinterleaveFrom(AudioFrame* audioFrame);
-  void InterleaveTo(AudioFrame* audioFrame) const;
   // If |data_changed| is false, only the non-audio data members will be copied
   // to |frame|.
   void InterleaveTo(AudioFrame* frame, bool data_changed) const;
@@ -97,9 +97,6 @@
   void CopyTo(int samples_per_channel,
               AudioProcessing::ChannelLayout layout,
               float* const* data);
-
-  void CopyAndMix(int num_mixed_channels);
-  void CopyAndMixLowPass(int num_mixed_channels);
   void CopyLowPassToReference();
 
  private:
@@ -112,8 +109,7 @@
   const int num_proc_channels_;
   const int output_samples_per_channel_;
   int samples_per_split_channel_;
-  int num_mixed_channels_;
-  int num_mixed_low_pass_channels_;
+  bool mixed_low_pass_valid_;
   bool reference_copied_;
   AudioFrame::VADActivity activity_;
 
@@ -121,7 +117,6 @@
   scoped_ptr<IFChannelBuffer> channels_;
   scoped_ptr<SplitChannelBuffer> split_channels_;
   scoped_ptr<SplitFilterStates[]> filter_states_;
-  scoped_ptr<ChannelBuffer<int16_t> > mixed_channels_;
   scoped_ptr<ChannelBuffer<int16_t> > mixed_low_pass_channels_;
   scoped_ptr<ChannelBuffer<int16_t> > low_pass_reference_channels_;
   scoped_ptr<ChannelBuffer<float> > input_buffer_;