diff options
Diffstat (limited to 'chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h')
-rw-r--r-- | chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h b/chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h index 770a992618a..f04dc0f3e81 100644 --- a/chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h +++ b/chromium/third_party/webrtc/common_audio/resampler/include/push_resampler.h @@ -20,6 +20,7 @@ class PushSincResampler; // Wraps PushSincResampler to provide stereo support. // TODO(ajm): add support for an arbitrary number of channels. +template <typename T> class PushResampler { public: PushResampler(); @@ -32,22 +33,18 @@ class PushResampler { // Returns the total number of samples provided in destination (e.g. 32 kHz, // 2 channel audio gives 640 samples). - int Resample(const int16_t* src, int src_length, int16_t* dst, - int dst_capacity); + int Resample(const T* src, int src_length, T* dst, int dst_capacity); private: - int ResampleSinc(const int16_t* src, int src_length, int16_t* dst, - int dst_capacity); - scoped_ptr<PushSincResampler> sinc_resampler_; scoped_ptr<PushSincResampler> sinc_resampler_right_; int src_sample_rate_hz_; int dst_sample_rate_hz_; int num_channels_; - scoped_array<int16_t> src_left_; - scoped_array<int16_t> src_right_; - scoped_array<int16_t> dst_left_; - scoped_array<int16_t> dst_right_; + scoped_ptr<T[]> src_left_; + scoped_ptr<T[]> src_right_; + scoped_ptr<T[]> dst_left_; + scoped_ptr<T[]> dst_right_; }; } // namespace webrtc |