| Index: webrtc/common_audio/resampler/sinc_resampler_unittest.cc
|
| diff --git a/webrtc/common_audio/resampler/sinc_resampler_unittest.cc b/webrtc/common_audio/resampler/sinc_resampler_unittest.cc
|
| index 42172ebdda7fae7da51d37e50ff9a9e169d5a7da..b8d6c341a2cd421dab665e9e2f5add50a5152c5d 100644
|
| --- a/webrtc/common_audio/resampler/sinc_resampler_unittest.cc
|
| +++ b/webrtc/common_audio/resampler/sinc_resampler_unittest.cc
|
| @@ -16,10 +16,9 @@
|
|
|
| #include <math.h>
|
|
|
| -#include <memory>
|
| -
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "webrtc/base/scoped_ptr.h"
|
| #include "webrtc/common_audio/resampler/sinc_resampler.h"
|
| #include "webrtc/common_audio/resampler/sinusoidal_linear_chirp_source.h"
|
| #include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
|
| @@ -63,7 +62,7 @@
|
|
|
| static const int kChunks = 2;
|
| size_t max_chunk_size = resampler.ChunkSize() * kChunks;
|
| - std::unique_ptr<float[]> resampled_destination(new float[max_chunk_size]);
|
| + rtc::scoped_ptr<float[]> resampled_destination(new float[max_chunk_size]);
|
|
|
| // Verify requesting ChunkSize() frames causes a single callback.
|
| EXPECT_CALL(mock_source, Run(_, _))
|
| @@ -82,7 +81,7 @@
|
| MockSource mock_source;
|
| SincResampler resampler(kSampleRateRatio, SincResampler::kDefaultRequestSize,
|
| &mock_source);
|
| - std::unique_ptr<float[]> resampled_destination(
|
| + rtc::scoped_ptr<float[]> resampled_destination(
|
| new float[resampler.ChunkSize()]);
|
|
|
| // Fill the resampler with junk data.
|
| @@ -270,7 +269,7 @@
|
|
|
| // Force an update to the sample rate ratio to ensure dyanmic sample rate
|
| // changes are working correctly.
|
| - std::unique_ptr<float[]> kernel(new float[SincResampler::kKernelStorageSize]);
|
| + rtc::scoped_ptr<float[]> kernel(new float[SincResampler::kKernelStorageSize]);
|
| memcpy(kernel.get(), resampler.get_kernel_for_testing(),
|
| SincResampler::kKernelStorageSize);
|
| resampler.SetRatio(M_PI);
|
| @@ -282,8 +281,8 @@
|
|
|
| // TODO(dalecurtis): If we switch to AVX/SSE optimization, we'll need to
|
| // allocate these on 32-byte boundaries and ensure they're sized % 32 bytes.
|
| - std::unique_ptr<float[]> resampled_destination(new float[output_samples]);
|
| - std::unique_ptr<float[]> pure_destination(new float[output_samples]);
|
| + rtc::scoped_ptr<float[]> resampled_destination(new float[output_samples]);
|
| + rtc::scoped_ptr<float[]> pure_destination(new float[output_samples]);
|
|
|
| // Generate resampled signal.
|
| resampler.Resample(output_samples, resampled_destination.get());
|
|
|