| Index: webrtc/modules/audio_processing/transient/transient_suppression_test.cc
|
| diff --git a/webrtc/modules/audio_processing/transient/transient_suppression_test.cc b/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
|
| index b7b7595abf4f5577fc6b79dfe56845d40689f95d..90ebb226d2f6f0b964f8c25e97fd0ce8737a0b5c 100644
|
| --- a/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
|
| +++ b/webrtc/modules/audio_processing/transient/transient_suppression_test.cc
|
| @@ -12,11 +12,12 @@
|
|
|
| #include <stdlib.h>
|
| #include <stdio.h>
|
| +
|
| +#include <memory>
|
| #include <string>
|
|
|
| #include "gflags/gflags.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| -#include "webrtc/base/scoped_ptr.h"
|
| #include "webrtc/common_audio/include/audio_util.h"
|
| #include "webrtc/modules/audio_processing/agc/agc.h"
|
| #include "webrtc/modules/include/module_common_types.h"
|
| @@ -83,7 +84,7 @@ bool ReadBuffers(FILE* in_file,
|
| float* detection_buffer,
|
| FILE* reference_file,
|
| float* reference_buffer) {
|
| - rtc::scoped_ptr<int16_t[]> tmpbuf;
|
| + std::unique_ptr<int16_t[]> tmpbuf;
|
| int16_t* read_ptr = audio_buffer;
|
| if (num_channels > 1) {
|
| tmpbuf.reset(new int16_t[num_channels * audio_buffer_size]);
|
| @@ -105,7 +106,7 @@ bool ReadBuffers(FILE* in_file,
|
| }
|
| }
|
| if (detection_file) {
|
| - rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[detection_buffer_size]);
|
| + std::unique_ptr<int16_t[]> ibuf(new int16_t[detection_buffer_size]);
|
| if (fread(ibuf.get(), sizeof(ibuf[0]), detection_buffer_size,
|
| detection_file) != detection_buffer_size)
|
| return false;
|
| @@ -113,7 +114,7 @@ bool ReadBuffers(FILE* in_file,
|
| detection_buffer[i] = ibuf[i];
|
| }
|
| if (reference_file) {
|
| - rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[audio_buffer_size]);
|
| + std::unique_ptr<int16_t[]> ibuf(new int16_t[audio_buffer_size]);
|
| if (fread(ibuf.get(), sizeof(ibuf[0]), audio_buffer_size, reference_file)
|
| != audio_buffer_size)
|
| return false;
|
| @@ -127,7 +128,7 @@ static void WritePCM(FILE* f,
|
| size_t num_samples,
|
| int num_channels,
|
| const float* buffer) {
|
| - rtc::scoped_ptr<int16_t[]> ibuf(new int16_t[num_channels * num_samples]);
|
| + std::unique_ptr<int16_t[]> ibuf(new int16_t[num_channels * num_samples]);
|
| // Interleave.
|
| for (int i = 0; i < num_channels; ++i) {
|
| for (size_t j = 0; j < num_samples; ++j) {
|
| @@ -182,12 +183,12 @@ void void_main() {
|
| FLAGS_chunk_size_ms * detection_rate_hz / 1000;
|
|
|
| // int16 and float variants of the same data.
|
| - rtc::scoped_ptr<int16_t[]> audio_buffer_i(
|
| + std::unique_ptr<int16_t[]> audio_buffer_i(
|
| new int16_t[FLAGS_num_channels * audio_buffer_size]);
|
| - rtc::scoped_ptr<float[]> audio_buffer_f(
|
| + std::unique_ptr<float[]> audio_buffer_f(
|
| new float[FLAGS_num_channels * audio_buffer_size]);
|
|
|
| - rtc::scoped_ptr<float[]> detection_buffer, reference_buffer;
|
| + std::unique_ptr<float[]> detection_buffer, reference_buffer;
|
|
|
| if (detection_file)
|
| detection_buffer.reset(new float[detection_buffer_size]);
|
|
|