aboutsummaryrefslogtreecommitdiff
path: root/audio/audio_state_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'audio/audio_state_unittest.cc')
-rw-r--r--audio/audio_state_unittest.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/audio/audio_state_unittest.cc b/audio/audio_state_unittest.cc
index 02fc04e6dc..5f07a7b339 100644
--- a/audio/audio_state_unittest.cc
+++ b/audio/audio_state_unittest.cc
@@ -90,7 +90,7 @@ struct FakeAsyncAudioProcessingHelper {
FakeTaskQueueFactory task_queue_factory_;
rtc::scoped_refptr<AsyncAudioProcessing::Factory> CreateFactory() {
- return new rtc::RefCountedObject<AsyncAudioProcessing::Factory>(
+ return rtc::make_ref_counted<AsyncAudioProcessing::Factory>(
audio_frame_processor_, task_queue_factory_);
}
};
@@ -107,10 +107,9 @@ struct ConfigHelper {
audio_state_config.audio_processing =
params.use_null_audio_processing
? nullptr
- : new rtc::RefCountedObject<
- testing::NiceMock<MockAudioProcessing>>();
+ : rtc::make_ref_counted<testing::NiceMock<MockAudioProcessing>>();
audio_state_config.audio_device_module =
- new rtc::RefCountedObject<NiceMock<MockAudioDeviceModule>>();
+ rtc::make_ref_counted<NiceMock<MockAudioDeviceModule>>();
if (params.use_async_audio_processing) {
audio_state_config.async_audio_processing_factory =
async_audio_processing_helper_.CreateFactory();
@@ -183,7 +182,7 @@ TEST_P(AudioStateTest, Create) {
TEST_P(AudioStateTest, ConstructDestruct) {
ConfigHelper helper(GetParam());
rtc::scoped_refptr<internal::AudioState> audio_state(
- new rtc::RefCountedObject<internal::AudioState>(helper.config()));
+ rtc::make_ref_counted<internal::AudioState>(helper.config()));
}
TEST_P(AudioStateTest, RecordedAudioArrivesAtSingleStream) {
@@ -196,7 +195,7 @@ TEST_P(AudioStateTest, RecordedAudioArrivesAtSingleStream) {
}
rtc::scoped_refptr<internal::AudioState> audio_state(
- new rtc::RefCountedObject<internal::AudioState>(helper.config()));
+ rtc::make_ref_counted<internal::AudioState>(helper.config()));
MockAudioSendStream stream;
audio_state->AddSendingStream(&stream, 8000, 2);
@@ -245,7 +244,7 @@ TEST_P(AudioStateTest, RecordedAudioArrivesAtMultipleStreams) {
}
rtc::scoped_refptr<internal::AudioState> audio_state(
- new rtc::RefCountedObject<internal::AudioState>(helper.config()));
+ rtc::make_ref_counted<internal::AudioState>(helper.config()));
MockAudioSendStream stream_1;
MockAudioSendStream stream_2;
@@ -308,7 +307,7 @@ TEST_P(AudioStateTest, EnableChannelSwap) {
}
rtc::scoped_refptr<internal::AudioState> audio_state(
- new rtc::RefCountedObject<internal::AudioState>(helper.config()));
+ rtc::make_ref_counted<internal::AudioState>(helper.config()));
audio_state->SetStereoChannelSwapping(true);