diff --git a/webrtc/modules/audio_processing/test/audio_file_processor.cc b/webrtc/modules/audio_processing/test/audio_file_processor.cc index 56e9b4b96f..5febcd0dc8 100644 --- a/webrtc/modules/audio_processing/test/audio_file_processor.cc +++ b/webrtc/modules/audio_processing/test/audio_file_processor.cc @@ -16,7 +16,6 @@ #include "webrtc/base/checks.h" #include "webrtc/modules/audio_processing/test/protobuf_utils.h" -using rtc::scoped_ptr; using rtc::CheckedDivExact; using std::vector; using webrtc::audioproc::Event; @@ -41,9 +40,9 @@ ChannelBuffer GetChannelBuffer(const WavFile& file) { } // namespace -WavFileProcessor::WavFileProcessor(scoped_ptr ap, - scoped_ptr in_file, - scoped_ptr out_file) +WavFileProcessor::WavFileProcessor(std::unique_ptr ap, + std::unique_ptr in_file, + std::unique_ptr out_file) : ap_(std::move(ap)), in_buf_(GetChannelBuffer(*in_file)), out_buf_(GetChannelBuffer(*out_file)), @@ -66,9 +65,9 @@ bool WavFileProcessor::ProcessChunk() { return true; } -AecDumpFileProcessor::AecDumpFileProcessor(scoped_ptr ap, +AecDumpFileProcessor::AecDumpFileProcessor(std::unique_ptr ap, FILE* dump_file, - scoped_ptr out_file) + std::unique_ptr out_file) : ap_(std::move(ap)), dump_file_(dump_file), out_buf_(GetChannelBuffer(*out_file)), diff --git a/webrtc/modules/audio_processing/test/audio_file_processor.h b/webrtc/modules/audio_processing/test/audio_file_processor.h index 3ba20340d2..f3db86dc84 100644 --- a/webrtc/modules/audio_processing/test/audio_file_processor.h +++ b/webrtc/modules/audio_processing/test/audio_file_processor.h @@ -13,9 +13,9 @@ #include #include +#include #include -#include "webrtc/base/scoped_ptr.h" #include "webrtc/common_audio/channel_buffer.h" #include "webrtc/common_audio/wav_file.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" @@ -84,16 +84,16 @@ class AudioFileProcessor { class WavFileProcessor final : public AudioFileProcessor { public: // Takes ownership of all parameters. - WavFileProcessor(rtc::scoped_ptr ap, - rtc::scoped_ptr in_file, - rtc::scoped_ptr out_file); + WavFileProcessor(std::unique_ptr ap, + std::unique_ptr in_file, + std::unique_ptr out_file); virtual ~WavFileProcessor() {} // Processes one chunk from the WAV input and writes to the WAV output. bool ProcessChunk() override; private: - rtc::scoped_ptr ap_; + std::unique_ptr ap_; ChannelBuffer in_buf_; ChannelBuffer out_buf_; @@ -107,9 +107,9 @@ class WavFileProcessor final : public AudioFileProcessor { class AecDumpFileProcessor final : public AudioFileProcessor { public: // Takes ownership of all parameters. - AecDumpFileProcessor(rtc::scoped_ptr ap, + AecDumpFileProcessor(std::unique_ptr ap, FILE* dump_file, - rtc::scoped_ptr out_file); + std::unique_ptr out_file); virtual ~AecDumpFileProcessor(); @@ -122,11 +122,11 @@ class AecDumpFileProcessor final : public AudioFileProcessor { void HandleMessage(const webrtc::audioproc::Stream& msg); void HandleMessage(const webrtc::audioproc::ReverseStream& msg); - rtc::scoped_ptr ap_; + std::unique_ptr ap_; FILE* dump_file_; - rtc::scoped_ptr> in_buf_; - rtc::scoped_ptr> reverse_buf_; + std::unique_ptr> in_buf_; + std::unique_ptr> reverse_buf_; ChannelBuffer out_buf_; StreamConfig input_config_; StreamConfig reverse_config_; diff --git a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc index df3273e19a..3ffed87444 100644 --- a/webrtc/modules/audio_processing/test/audio_processing_unittest.cc +++ b/webrtc/modules/audio_processing/test/audio_processing_unittest.cc @@ -10,12 +10,13 @@ #include #include + #include #include +#include #include #include "webrtc/base/arraysize.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/common_audio/include/audio_util.h" #include "webrtc/common_audio/resampler/include/push_resampler.h" #include "webrtc/common_audio/resampler/push_sinc_resampler.h" @@ -226,7 +227,7 @@ void OpenFileAndWriteMessage(const std::string filename, int32_t size = msg.ByteSize(); ASSERT_GT(size, 0); - rtc::scoped_ptr array(new uint8_t[size]); + std::unique_ptr array(new uint8_t[size]); ASSERT_TRUE(msg.SerializeToArray(array.get(), size)); ASSERT_EQ(1u, fwrite(&size, sizeof(size), 1, file)); @@ -390,11 +391,11 @@ class ApmTest : public ::testing::Test { const std::string output_path_; const std::string ref_path_; const std::string ref_filename_; - rtc::scoped_ptr apm_; + std::unique_ptr apm_; AudioFrame* frame_; AudioFrame* revframe_; - rtc::scoped_ptr > float_cb_; - rtc::scoped_ptr > revfloat_cb_; + std::unique_ptr > float_cb_; + std::unique_ptr > revfloat_cb_; int output_sample_rate_hz_; size_t num_output_channels_; FILE* far_file_; @@ -1079,8 +1080,8 @@ TEST_F(ApmTest, EchoControlMobile) { // Set and get echo path const size_t echo_path_size = apm_->echo_control_mobile()->echo_path_size_bytes(); - rtc::scoped_ptr echo_path_in(new char[echo_path_size]); - rtc::scoped_ptr echo_path_out(new char[echo_path_size]); + std::unique_ptr echo_path_in(new char[echo_path_size]); + std::unique_ptr echo_path_out(new char[echo_path_size]); EXPECT_EQ(apm_->kNullPointerError, apm_->echo_control_mobile()->SetEchoPath(NULL, echo_path_size)); EXPECT_EQ(apm_->kNullPointerError, @@ -1305,15 +1306,15 @@ TEST_F(ApmTest, AgcOnlyAdaptsWhenTargetSignalIsPresent) { config.Set(new Beamforming(true, geometry)); testing::NiceMock* beamformer = new testing::NiceMock(geometry); - rtc::scoped_ptr apm( + std::unique_ptr apm( AudioProcessing::Create(config, beamformer)); EXPECT_EQ(kNoErr, apm->gain_control()->Enable(true)); ChannelBuffer src_buf(kSamplesPerChannel, kNumInputChannels); ChannelBuffer dest_buf(kSamplesPerChannel, kNumOutputChannels); const size_t max_length = kSamplesPerChannel * std::max(kNumInputChannels, kNumOutputChannels); - rtc::scoped_ptr int_data(new int16_t[max_length]); - rtc::scoped_ptr float_data(new float[max_length]); + std::unique_ptr int_data(new int16_t[max_length]); + std::unique_ptr float_data(new float[max_length]); std::string filename = ResourceFilePath("far", kSampleRateHz); FILE* far_file = fopen(filename.c_str(), "rb"); ASSERT_TRUE(far_file != NULL) << "Could not open file " << filename << "\n"; @@ -1828,9 +1829,9 @@ void ApmTest::VerifyDebugDumpTest(Format format) { ASSERT_TRUE(ref_file != NULL); ASSERT_TRUE(out_file != NULL); ASSERT_TRUE(limited_file != NULL); - rtc::scoped_ptr ref_bytes; - rtc::scoped_ptr out_bytes; - rtc::scoped_ptr limited_bytes; + std::unique_ptr ref_bytes; + std::unique_ptr out_bytes; + std::unique_ptr limited_bytes; size_t ref_size = ReadMessageBytesFromFile(ref_file, &ref_bytes); size_t out_size = ReadMessageBytesFromFile(out_file, &out_bytes); @@ -1944,7 +1945,7 @@ TEST_F(ApmTest, FloatAndIntInterfacesGiveSimilarResults) { Config config; config.Set(new ExperimentalAgc(false)); - rtc::scoped_ptr fapm(AudioProcessing::Create(config)); + std::unique_ptr fapm(AudioProcessing::Create(config)); EnableAllComponents(); EnableAllAPComponents(fapm.get()); for (int i = 0; i < ref_data.test_size(); i++) { @@ -2285,7 +2286,7 @@ TEST_F(ApmTest, NoErrorsWithKeyboardChannel) { {AudioProcessing::kStereoAndKeyboard, AudioProcessing::kStereo}, }; - rtc::scoped_ptr ap(AudioProcessing::Create()); + std::unique_ptr ap(AudioProcessing::Create()); // Enable one component just to ensure some processing takes place. ap->noise_suppression()->Enable(true); for (size_t i = 0; i < arraysize(cf); ++i) { @@ -2410,7 +2411,7 @@ class AudioProcessingTest std::string output_file_prefix) { Config config; config.Set(new ExperimentalAgc(false)); - rtc::scoped_ptr ap(AudioProcessing::Create(config)); + std::unique_ptr ap(AudioProcessing::Create(config)); EnableAllAPComponents(ap.get()); ProcessingConfig processing_config = { @@ -2455,8 +2456,8 @@ class AudioProcessingTest const int max_length = 2 * std::max(std::max(out_cb.num_frames(), rev_out_cb.num_frames()), std::max(fwd_cb.num_frames(), rev_cb.num_frames())); - rtc::scoped_ptr float_data(new float[max_length]); - rtc::scoped_ptr int_data(new int16_t[max_length]); + std::unique_ptr float_data(new float[max_length]); + std::unique_ptr int_data(new int16_t[max_length]); int analog_level = 127; while (ReadChunk(far_file, int_data.get(), float_data.get(), &rev_cb) && @@ -2583,12 +2584,12 @@ TEST_P(AudioProcessingTest, Formats) { const size_t ref_length = SamplesFromRate(ref_rate) * out_num; const size_t out_length = SamplesFromRate(out_rate) * out_num; // Data from the reference file. - rtc::scoped_ptr ref_data(new float[ref_length]); + std::unique_ptr ref_data(new float[ref_length]); // Data from the output file. - rtc::scoped_ptr out_data(new float[out_length]); + std::unique_ptr out_data(new float[out_length]); // Data from the resampled output, in case the reference and output rates // don't match. - rtc::scoped_ptr cmp_data(new float[ref_length]); + std::unique_ptr cmp_data(new float[ref_length]); PushResampler resampler; resampler.InitializeIfNeeded(out_rate, ref_rate, out_num); diff --git a/webrtc/modules/audio_processing/test/audioproc_float.cc b/webrtc/modules/audio_processing/test/audioproc_float.cc index a489d255c8..b403c1fe05 100644 --- a/webrtc/modules/audio_processing/test/audioproc_float.cc +++ b/webrtc/modules/audio_processing/test/audioproc_float.cc @@ -9,7 +9,9 @@ */ #include + #include +#include #include #include #include @@ -17,7 +19,6 @@ #include "gflags/gflags.h" #include "webrtc/base/checks.h" #include "webrtc/base/format_macros.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/common_audio/channel_buffer.h" #include "webrtc/common_audio/wav_file.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" @@ -115,7 +116,7 @@ int main(int argc, char* argv[]) { config.Set(new ExperimentalNs(FLAGS_ts || FLAGS_all)); config.Set(new Intelligibility(FLAGS_ie || FLAGS_all)); - rtc::scoped_ptr ap(AudioProcessing::Create(config)); + std::unique_ptr ap(AudioProcessing::Create(config)); RTC_CHECK_EQ(kNoErr, ap->echo_cancellation()->Enable(FLAGS_aec || FLAGS_all)); RTC_CHECK_EQ(kNoErr, ap->gain_control()->Enable(FLAGS_agc || FLAGS_all)); RTC_CHECK_EQ(kNoErr, ap->high_pass_filter()->Enable(FLAGS_hpf || FLAGS_all)); @@ -127,12 +128,12 @@ int main(int argc, char* argv[]) { } ap->set_stream_key_pressed(FLAGS_ts); - rtc::scoped_ptr processor; - auto out_file = rtc_make_scoped_ptr(new WavWriter( + std::unique_ptr processor; + auto out_file = std::unique_ptr(new WavWriter( FLAGS_o, FLAGS_out_sample_rate, static_cast(FLAGS_out_channels))); std::cout << FLAGS_o << ": " << out_file->FormatAsString() << std::endl; if (FLAGS_dump.empty()) { - auto in_file = rtc_make_scoped_ptr(new WavReader(FLAGS_i)); + auto in_file = std::unique_ptr(new WavReader(FLAGS_i)); std::cout << FLAGS_i << ": " << in_file->FormatAsString() << std::endl; processor.reset(new WavFileProcessor(std::move(ap), std::move(in_file), std::move(out_file))); diff --git a/webrtc/modules/audio_processing/test/debug_dump_test.cc b/webrtc/modules/audio_processing/test/debug_dump_test.cc index e3b375e525..6ca82a4d43 100644 --- a/webrtc/modules/audio_processing/test/debug_dump_test.cc +++ b/webrtc/modules/audio_processing/test/debug_dump_test.cc @@ -9,12 +9,13 @@ */ #include // size_t + +#include #include #include #include "testing/gtest/include/gtest/gtest.h" #include "webrtc/base/checks.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/common_audio/channel_buffer.h" #include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h" #include "webrtc/modules/audio_processing/debug.pb.h" @@ -28,7 +29,7 @@ namespace test { namespace { -void MaybeResetBuffer(rtc::scoped_ptr>* buffer, +void MaybeResetBuffer(std::unique_ptr>* buffer, const StreamConfig& config) { auto& buffer_ref = *buffer; if (!buffer_ref.get() || buffer_ref->num_frames() != config.num_frames() || @@ -101,11 +102,11 @@ class DebugDumpGenerator { const int reverse_file_channels_; // Buffer for APM input/output. - rtc::scoped_ptr> input_; - rtc::scoped_ptr> reverse_; - rtc::scoped_ptr> output_; + std::unique_ptr> input_; + std::unique_ptr> reverse_; + std::unique_ptr> output_; - rtc::scoped_ptr apm_; + std::unique_ptr apm_; const std::string dump_file_name_; }; @@ -250,11 +251,11 @@ class DebugDumpTest : public ::testing::Test { void ConfigureApm(const audioproc::Config& msg); // Buffer for APM input/output. - rtc::scoped_ptr> input_; - rtc::scoped_ptr> reverse_; - rtc::scoped_ptr> output_; + std::unique_ptr> input_; + std::unique_ptr> reverse_; + std::unique_ptr> output_; - rtc::scoped_ptr apm_; + std::unique_ptr apm_; StreamConfig input_config_; StreamConfig reverse_config_; diff --git a/webrtc/modules/audio_processing/test/process_test.cc b/webrtc/modules/audio_processing/test/process_test.cc index 030268220e..d3b16be31f 100644 --- a/webrtc/modules/audio_processing/test/process_test.cc +++ b/webrtc/modules/audio_processing/test/process_test.cc @@ -16,9 +16,9 @@ #endif #include +#include #include "webrtc/base/format_macros.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/common.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" #include "webrtc/modules/audio_processing/test/protobuf_utils.h" @@ -147,7 +147,7 @@ void void_main(int argc, char* argv[]) { printf("Try `process_test --help' for more information.\n\n"); } - rtc::scoped_ptr apm(AudioProcessing::Create()); + std::unique_ptr apm(AudioProcessing::Create()); ASSERT_TRUE(apm.get() != NULL); const char* pb_filename = NULL; @@ -495,8 +495,8 @@ void void_main(int argc, char* argv[]) { FILE* aecm_echo_path_in_file = NULL; FILE* aecm_echo_path_out_file = NULL; - rtc::scoped_ptr output_wav_file; - rtc::scoped_ptr output_raw_file; + std::unique_ptr output_wav_file; + std::unique_ptr output_raw_file; if (pb_filename) { pb_file = OpenFile(pb_filename, "rb"); @@ -538,7 +538,7 @@ void void_main(int argc, char* argv[]) { const size_t path_size = apm->echo_control_mobile()->echo_path_size_bytes(); - rtc::scoped_ptr echo_path(new char[path_size]); + std::unique_ptr echo_path(new char[path_size]); ASSERT_EQ(path_size, fread(echo_path.get(), sizeof(char), path_size, @@ -580,8 +580,8 @@ void void_main(int argc, char* argv[]) { // but for now we want to share the variables. if (pb_file) { Event event_msg; - rtc::scoped_ptr > reverse_cb; - rtc::scoped_ptr > primary_cb; + std::unique_ptr > reverse_cb; + std::unique_ptr > primary_cb; int output_sample_rate = 32000; AudioProcessing::ChannelLayout output_layout = AudioProcessing::kMono; while (ReadMessageFromFile(pb_file, &event_msg)) { @@ -1061,7 +1061,7 @@ void void_main(int argc, char* argv[]) { if (aecm_echo_path_out_file != NULL) { const size_t path_size = apm->echo_control_mobile()->echo_path_size_bytes(); - rtc::scoped_ptr echo_path(new char[path_size]); + std::unique_ptr echo_path(new char[path_size]); apm->echo_control_mobile()->GetEchoPath(echo_path.get(), path_size); ASSERT_EQ(path_size, fwrite(echo_path.get(), sizeof(char), diff --git a/webrtc/modules/audio_processing/test/protobuf_utils.cc b/webrtc/modules/audio_processing/test/protobuf_utils.cc index 37042cdc14..c18a13e6ed 100644 --- a/webrtc/modules/audio_processing/test/protobuf_utils.cc +++ b/webrtc/modules/audio_processing/test/protobuf_utils.cc @@ -9,10 +9,11 @@ */ #include "webrtc/modules/audio_processing/test/protobuf_utils.h" +#include "webrtc/typedefs.h" namespace webrtc { -size_t ReadMessageBytesFromFile(FILE* file, rtc::scoped_ptr* bytes) { +size_t ReadMessageBytesFromFile(FILE* file, std::unique_ptr* bytes) { // The "wire format" for the size is little-endian. Assume we're running on // a little-endian machine. #ifndef WEBRTC_ARCH_LITTLE_ENDIAN @@ -30,7 +31,7 @@ size_t ReadMessageBytesFromFile(FILE* file, rtc::scoped_ptr* bytes) { // Returns true on success, false on error or end-of-file. bool ReadMessageFromFile(FILE* file, ::google::protobuf::MessageLite* msg) { - rtc::scoped_ptr bytes; + std::unique_ptr bytes; size_t size = ReadMessageBytesFromFile(file, &bytes); if (!size) return false; diff --git a/webrtc/modules/audio_processing/test/protobuf_utils.h b/webrtc/modules/audio_processing/test/protobuf_utils.h index 406f128b3b..3ab90b7761 100644 --- a/webrtc/modules/audio_processing/test/protobuf_utils.h +++ b/webrtc/modules/audio_processing/test/protobuf_utils.h @@ -11,14 +11,15 @@ #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_ #define WEBRTC_MODULES_AUDIO_PROCESSING_TEST_PROTOBUF_UTILS_H_ -#include "webrtc/base/scoped_ptr.h" +#include + #include "webrtc/modules/audio_processing/debug.pb.h" namespace webrtc { -// Allocates new memory in the scoped_ptr to fit the raw message and returns the +// Allocates new memory in the unique_ptr to fit the raw message and returns the // number of bytes read. -size_t ReadMessageBytesFromFile(FILE* file, rtc::scoped_ptr* bytes); +size_t ReadMessageBytesFromFile(FILE* file, std::unique_ptr* bytes); // Returns true on success, false on error or end-of-file. bool ReadMessageFromFile(FILE* file, ::google::protobuf::MessageLite* msg); diff --git a/webrtc/modules/audio_processing/test/test_utils.cc b/webrtc/modules/audio_processing/test/test_utils.cc index 0bd70126ae..0d50b0cbb5 100644 --- a/webrtc/modules/audio_processing/test/test_utils.cc +++ b/webrtc/modules/audio_processing/test/test_utils.cc @@ -33,7 +33,7 @@ void RawFile::WriteSamples(const float* samples, size_t num_samples) { fwrite(samples, sizeof(*samples), num_samples, file_handle_); } -ChannelBufferWavReader::ChannelBufferWavReader(rtc::scoped_ptr file) +ChannelBufferWavReader::ChannelBufferWavReader(std::unique_ptr file) : file_(std::move(file)) {} bool ChannelBufferWavReader::Read(ChannelBuffer* buffer) { @@ -50,7 +50,7 @@ bool ChannelBufferWavReader::Read(ChannelBuffer* buffer) { return true; } -ChannelBufferWavWriter::ChannelBufferWavWriter(rtc::scoped_ptr file) +ChannelBufferWavWriter::ChannelBufferWavWriter(std::unique_ptr file) : file_(std::move(file)) {} void ChannelBufferWavWriter::Write(const ChannelBuffer& buffer) { @@ -80,7 +80,7 @@ void WriteFloatData(const float* const* data, WavWriter* wav_file, RawFile* raw_file) { size_t length = num_channels * samples_per_channel; - rtc::scoped_ptr buffer(new float[length]); + std::unique_ptr buffer(new float[length]); Interleave(data, samples_per_channel, num_channels, buffer.get()); if (raw_file) { raw_file->WriteSamples(buffer.get(), length); diff --git a/webrtc/modules/audio_processing/test/test_utils.h b/webrtc/modules/audio_processing/test/test_utils.h index e23beb66f4..5de67cf3b2 100644 --- a/webrtc/modules/audio_processing/test/test_utils.h +++ b/webrtc/modules/audio_processing/test/test_utils.h @@ -14,11 +14,11 @@ #include #include #include +#include #include #include #include "webrtc/base/constructormagic.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/common_audio/channel_buffer.h" #include "webrtc/common_audio/wav_file.h" #include "webrtc/modules/audio_processing/include/audio_processing.h" @@ -46,14 +46,14 @@ class RawFile final { // Reads ChannelBuffers from a provided WavReader. class ChannelBufferWavReader final { public: - explicit ChannelBufferWavReader(rtc::scoped_ptr file); + explicit ChannelBufferWavReader(std::unique_ptr file); // Reads data from the file according to the |buffer| format. Returns false if // a full buffer can't be read from the file. bool Read(ChannelBuffer* buffer); private: - rtc::scoped_ptr file_; + std::unique_ptr file_; std::vector interleaved_; RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavReader); @@ -62,11 +62,11 @@ class ChannelBufferWavReader final { // Writes ChannelBuffers to a provided WavWriter. class ChannelBufferWavWriter final { public: - explicit ChannelBufferWavWriter(rtc::scoped_ptr file); + explicit ChannelBufferWavWriter(std::unique_ptr file); void Write(const ChannelBuffer& buffer); private: - rtc::scoped_ptr file_; + std::unique_ptr file_; std::vector interleaved_; RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter); @@ -95,7 +95,7 @@ template void SetContainerFormat(int sample_rate_hz, size_t num_channels, AudioFrame* frame, - rtc::scoped_ptr >* cb) { + std::unique_ptr >* cb) { SetFrameSampleRate(frame, sample_rate_hz); frame->num_channels_ = num_channels; cb->reset(new ChannelBuffer(frame->samples_per_channel_, num_channels)); diff --git a/webrtc/modules/audio_processing/test/unpack.cc b/webrtc/modules/audio_processing/test/unpack.cc index a1e594ced3..ec2317867d 100644 --- a/webrtc/modules/audio_processing/test/unpack.cc +++ b/webrtc/modules/audio_processing/test/unpack.cc @@ -15,9 +15,10 @@ #include +#include + #include "gflags/gflags.h" #include "webrtc/base/format_macros.h" -#include "webrtc/base/scoped_ptr.h" #include "webrtc/modules/audio_processing/debug.pb.h" #include "webrtc/modules/audio_processing/test/protobuf_utils.h" #include "webrtc/modules/audio_processing/test/test_utils.h" @@ -83,12 +84,12 @@ int do_main(int argc, char* argv[]) { size_t num_reverse_channels = 0; size_t num_input_channels = 0; size_t num_output_channels = 0; - rtc::scoped_ptr reverse_wav_file; - rtc::scoped_ptr input_wav_file; - rtc::scoped_ptr output_wav_file; - rtc::scoped_ptr reverse_raw_file; - rtc::scoped_ptr input_raw_file; - rtc::scoped_ptr output_raw_file; + std::unique_ptr reverse_wav_file; + std::unique_ptr input_wav_file; + std::unique_ptr output_wav_file; + std::unique_ptr reverse_raw_file; + std::unique_ptr input_raw_file; + std::unique_ptr output_raw_file; FILE* settings_file = OpenFile(FLAGS_settings_file, "wb"); @@ -116,7 +117,7 @@ int do_main(int argc, char* argv[]) { if (FLAGS_raw && !reverse_raw_file) { reverse_raw_file.reset(new RawFile(FLAGS_reverse_file + ".float")); } - rtc::scoped_ptr data( + std::unique_ptr data( new const float* [num_reverse_channels]); for (size_t i = 0; i < num_reverse_channels; ++i) { data[i] = reinterpret_cast(msg.channel(i).data()); @@ -147,7 +148,7 @@ int do_main(int argc, char* argv[]) { if (FLAGS_raw && !input_raw_file) { input_raw_file.reset(new RawFile(FLAGS_input_file + ".float")); } - rtc::scoped_ptr data( + std::unique_ptr data( new const float* [num_input_channels]); for (size_t i = 0; i < num_input_channels; ++i) { data[i] = reinterpret_cast(msg.input_channel(i).data()); @@ -171,7 +172,7 @@ int do_main(int argc, char* argv[]) { if (FLAGS_raw && !output_raw_file) { output_raw_file.reset(new RawFile(FLAGS_output_file + ".float")); } - rtc::scoped_ptr data( + std::unique_ptr data( new const float* [num_output_channels]); for (size_t i = 0; i < num_output_channels; ++i) { data[i] =