Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: content/renderer/media/webrtc_local_audio_track_unittest.cc

Issue 99033003: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add PlatformEffects, unittests and clean up. Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/renderer/media/webrtc_local_audio_track_unittest.cc
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index f5b668a2fedfe304c32aae43994da0f21c14aa34..3c9caa7d90fa38def765bfa0020413dee4df6301 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -166,9 +166,11 @@ class WebRtcLocalAudioTrackTest : public ::testing::Test {
capturer_source_ = new MockCapturerSource(capturer_.get());
EXPECT_CALL(*capturer_source_.get(), OnInitialize(_, capturer_.get(), 0))
.WillOnce(Return());
+ media::AudioParameters::PlatformEffects effects;
capturer_->SetCapturerSource(capturer_source_,
params_.channel_layout(),
- params_.sample_rate());
+ params_.sample_rate(),
+ effects);
}
media::AudioParameters params_;
@@ -458,9 +460,11 @@ TEST_F(WebRtcLocalAudioTrackTest, SetNewSourceForCapturerAfterStartTrack) {
EXPECT_CALL(*new_source.get(), OnInitialize(_, capturer_.get(), 0))
.WillOnce(Return());
EXPECT_CALL(*new_source.get(), OnStart());
+ media::AudioParameters::PlatformEffects effects;
capturer_->SetCapturerSource(new_source,
params_.channel_layout(),
- params_.sample_rate());
+ params_.sample_rate(),
+ effects);
// Stop the track.
EXPECT_CALL(*new_source.get(), OnStop());
@@ -502,9 +506,11 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectTracksToDifferentCapturers) {
scoped_refptr<MockCapturerSource> new_source(
new MockCapturerSource(new_capturer.get()));
EXPECT_CALL(*new_source.get(), OnInitialize(_, new_capturer.get(), 0));
+ media::AudioParameters::PlatformEffects effects;
new_capturer->SetCapturerSource(new_source,
media::CHANNEL_LAYOUT_MONO,
- 44100);
+ 44100,
+ effects);
// Setup the second audio track, connect it to the new capturer and start it.
EXPECT_CALL(*new_source.get(), SetAutomaticGainControl(true));
@@ -559,12 +565,14 @@ TEST_F(WebRtcLocalAudioTrackTest, TrackWorkWithSmallBufferSize) {
WebRtcAudioCapturer::CreateCapturer());
scoped_refptr<MockCapturerSource> source(
new MockCapturerSource(capturer.get()));
+ media::AudioParameters::PlatformEffects effects;
capturer->Initialize(-1, params.channel_layout(), params.sample_rate(),
- params.frames_per_buffer(), 0, std::string(), 0, 0);
+ params.frames_per_buffer(), 0, std::string(), 0, 0,
+ effects);
EXPECT_CALL(*source.get(), OnInitialize(_, capturer.get(), 0));
capturer->SetCapturerSource(source, params.channel_layout(),
- params.sample_rate());
+ params.sample_rate(), effects);
// Setup a audio track, connect it to the capturer and start it.
EXPECT_CALL(*source.get(), SetAutomaticGainControl(true));

Powered by Google App Engine
This is Rietveld 408576698