| Index: media/base/sinc_resampler_unittest.cc
|
| diff --git a/media/base/sinc_resampler_unittest.cc b/media/base/sinc_resampler_unittest.cc
|
| index 37e2649f6edabf50273bb56a827b5436f9cacba3..8dd346ee467cbed086acf78272d1c846fcd8c533 100644
|
| --- a/media/base/sinc_resampler_unittest.cc
|
| +++ b/media/base/sinc_resampler_unittest.cc
|
| @@ -6,6 +6,7 @@
|
| #define _USE_MATH_DEFINES
|
|
|
| #include <cmath>
|
| +#include <memory>
|
|
|
| #include "base/bind.h"
|
| #include "base/bind_helpers.h"
|
| @@ -53,7 +54,7 @@ TEST(SincResamplerTest, ChunkedResample) {
|
|
|
| static const int kChunks = 2;
|
| int max_chunk_size = resampler.ChunkSize() * kChunks;
|
| - scoped_ptr<float[]> resampled_destination(new float[max_chunk_size]);
|
| + std::unique_ptr<float[]> resampled_destination(new float[max_chunk_size]);
|
|
|
| // Verify requesting ChunkSize() frames causes a single callback.
|
| EXPECT_CALL(mock_source, ProvideInput(_, _))
|
| @@ -96,7 +97,7 @@ TEST(SincResamplerTest, PrimedResample) {
|
|
|
| const int kChunks = 2;
|
| const int kMaxFrames = max_chunk_size * kChunks;
|
| - scoped_ptr<float[]> resampled_destination(new float[kMaxFrames]);
|
| + std::unique_ptr<float[]> resampled_destination(new float[kMaxFrames]);
|
|
|
| // Verify requesting ChunkSize() frames causes a single callback.
|
| EXPECT_CALL(mock_source, ProvideInput(_, _))
|
| @@ -118,7 +119,8 @@ TEST(SincResamplerTest, Flush) {
|
| SincResampler resampler(
|
| kSampleRateRatio, SincResampler::kDefaultRequestSize,
|
| base::Bind(&MockSource::ProvideInput, base::Unretained(&mock_source)));
|
| - scoped_ptr<float[]> resampled_destination(new float[resampler.ChunkSize()]);
|
| + std::unique_ptr<float[]> resampled_destination(
|
| + new float[resampler.ChunkSize()]);
|
|
|
| // Fill the resampler with junk data.
|
| EXPECT_CALL(mock_source, ProvideInput(_, _))
|
| @@ -290,7 +292,7 @@ TEST_P(SincResamplerTest, Resample) {
|
|
|
| // Force an update to the sample rate ratio to ensure dyanmic sample rate
|
| // changes are working correctly.
|
| - scoped_ptr<float[]> kernel(new float[SincResampler::kKernelStorageSize]);
|
| + std::unique_ptr<float[]> kernel(new float[SincResampler::kKernelStorageSize]);
|
| memcpy(kernel.get(), resampler.get_kernel_for_testing(),
|
| SincResampler::kKernelStorageSize);
|
| resampler.SetRatio(M_PI);
|
| @@ -302,8 +304,8 @@ TEST_P(SincResamplerTest, Resample) {
|
|
|
| // 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.
|
| - scoped_ptr<float[]> resampled_destination(new float[output_samples]);
|
| - scoped_ptr<float[]> pure_destination(new float[output_samples]);
|
| + std::unique_ptr<float[]> resampled_destination(new float[output_samples]);
|
| + std::unique_ptr<float[]> pure_destination(new float[output_samples]);
|
|
|
| // Generate resampled signal.
|
| resampler.Resample(output_samples, resampled_destination.get());
|
|
|