Index: content/renderer/media/media_stream_audio_processor_unittest.cc |
diff --git a/content/renderer/media/media_stream_audio_processor_unittest.cc b/content/renderer/media/media_stream_audio_processor_unittest.cc |
index f562055905169867fc91af330194afa3481a1c1f..1c53e21c4058f9946875aa8d27babc154a3c4eb9 100644 |
--- a/content/renderer/media/media_stream_audio_processor_unittest.cc |
+++ b/content/renderer/media/media_stream_audio_processor_unittest.cc |
@@ -80,10 +80,16 @@ class MediaStreamAudioProcessorTest : public ::testing::Test { |
// |audio_processor| does nothing when the audio processing is off in |
// the processor. |
- audio_processor->PushRenderData( |
- data_ptr, |
- params_.sample_rate(), params_.channels(), |
- params_.frames_per_buffer(), base::TimeDelta::FromMilliseconds(10)); |
+ webrtc::AudioProcessing* ap = audio_processor->audio_processing_.get(); |
+#if defined(OS_ANDROID) || defined(OS_IOS) |
+ const bool is_aec_enabled = ap && ap->echo_control_mobile()->is_enabled(); |
tommi (sloooow) - chröme
2014/02/17 15:03:44
out of curiosity, what's the difference between ec
no longer working on chromium
2014/02/17 17:15:32
echo_control_mobile() is the AEC used by mobile, a
tommi (sloooow) - chröme
2014/02/18 12:54:12
What I'm trying to understand is the difference be
no longer working on chromium
2014/02/18 17:37:53
Comment has been addressed offline, the answer is
|
+#else |
+ const bool is_aec_enabled = ap && ap->echo_cancellation()->is_enabled(); |
+#endif |
+ if (is_aec_enabled) { |
+ audio_processor->OnPlayoutData(data_bus.get(), params_.sample_rate(), |
+ 10); |
+ } |
int16* output = NULL; |
int new_volume = 0; |
@@ -145,7 +151,7 @@ TEST_F(MediaStreamAudioProcessorTest, WithoutAudioProcessing) { |
// Setup the audio processor without enabling the flag. |
blink::WebMediaConstraints constraints; |
scoped_refptr<MediaStreamAudioProcessor> audio_processor( |
- new MediaStreamAudioProcessor(params_, constraints, 0)); |
+ new MediaStreamAudioProcessor(params_, constraints, 0, NULL)); |
EXPECT_FALSE(audio_processor->has_audio_processing()); |
ProcessDataAndVerifyFormat(audio_processor, |
@@ -160,7 +166,7 @@ TEST_F(MediaStreamAudioProcessorTest, WithAudioProcessing) { |
switches::kEnableAudioTrackProcessing); |
blink::WebMediaConstraints constraints; |
scoped_refptr<MediaStreamAudioProcessor> audio_processor( |
- new MediaStreamAudioProcessor(params_, constraints, 0)); |
+ new MediaStreamAudioProcessor(params_, constraints, 0, NULL)); |
EXPECT_TRUE(audio_processor->has_audio_processing()); |
VerifyDefaultComponents(audio_processor); |