Revert "Revert "Audio processing: Feed each processing step its choice

of int or float data"

This reverts commit 6142.

R=kwiberg@webrtc.org

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

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6172 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
mflodman@webrtc.org
2014-05-15 11:17:21 +00:00
parent 024e4d5c6e
commit d5da25063c
9 changed files with 180 additions and 95 deletions

View File

@ -24,6 +24,7 @@ namespace webrtc {
class PushSincResampler;
class SplitChannelBuffer;
class IFChannelBuffer;
struct SplitFilterStates {
SplitFilterStates() {
@ -64,6 +65,13 @@ class AudioBuffer {
const int16_t* mixed_data(int channel) const;
const int16_t* mixed_low_pass_data(int channel) const;
const int16_t* low_pass_reference(int channel) const;
// Float versions of the accessors, with automatic conversion back and forth
// as necessary. The range of the numbers are the same as for int16_t.
float* data_f(int channel);
float* low_pass_split_data_f(int channel);
float* high_pass_split_data_f(int channel);
const float* keyboard_data() const;
SplitFilterStates* filter_states(int channel);
@ -111,7 +119,7 @@ class AudioBuffer {
int16_t* data_;
const float* keyboard_data_;
scoped_ptr<ChannelBuffer<int16_t> > channels_;
scoped_ptr<IFChannelBuffer> channels_;
scoped_ptr<SplitChannelBuffer> split_channels_;
scoped_ptr<SplitFilterStates[]> filter_states_;
scoped_ptr<ChannelBuffer<int16_t> > mixed_channels_;