Add resampling support in AudioBuffer::DeinterleaveFrom

It is necessary for adding 48kHz support to the AudioProcessing::AnalyzeReverseStream int interface (It was not necessary for 32kHz since in that case the splitting filter is more efficient).

BUG=webrtc:3146
R=andrew@webrtc.org, bjornv@webrtc.org

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

Cr-Commit-Position: refs/heads/master@{#9241}
This commit is contained in:
Alejandro Luebs
2015-05-20 14:39:39 -07:00
parent 76b62ff1ad
commit 05c760533f
2 changed files with 40 additions and 30 deletions

View File

@ -12,7 +12,6 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_AUDIO_BUFFER_H_
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/include/audio_util.h"
#include "webrtc/common_audio/channel_buffer.h"
#include "webrtc/modules/audio_processing/include/audio_processing.h"
#include "webrtc/modules/audio_processing/splitting_filter.h"
@ -156,7 +155,7 @@ class AudioBuffer {
rtc::scoped_ptr<SplittingFilter> splitting_filter_;
rtc::scoped_ptr<ChannelBuffer<int16_t> > mixed_low_pass_channels_;
rtc::scoped_ptr<ChannelBuffer<int16_t> > low_pass_reference_channels_;
rtc::scoped_ptr<ChannelBuffer<float> > input_buffer_;
rtc::scoped_ptr<IFChannelBuffer> input_buffer_;
rtc::scoped_ptr<ChannelBuffer<float> > process_buffer_;
ScopedVector<PushSincResampler> input_resamplers_;
ScopedVector<PushSincResampler> output_resamplers_;