OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 audio_processor->Stop(); | 476 audio_processor->Stop(); |
477 } | 477 } |
478 | 478 |
479 // Test that if we have an AEC dump message filter created, we are getting it | 479 // Test that if we have an AEC dump message filter created, we are getting it |
480 // correctly in MSAP. Any IPC messages will be deleted since no sender in the | 480 // correctly in MSAP. Any IPC messages will be deleted since no sender in the |
481 // filter will be created. | 481 // filter will be created. |
482 TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) { | 482 TEST_F(MediaStreamAudioProcessorTest, GetAecDumpMessageFilter) { |
483 base::MessageLoopForUI message_loop; | 483 base::MessageLoopForUI message_loop; |
484 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_( | 484 scoped_refptr<AecDumpMessageFilter> aec_dump_message_filter_( |
485 new AecDumpMessageFilter(message_loop.task_runner(), | 485 new AecDumpMessageFilter(message_loop.task_runner(), |
486 message_loop.task_runner(), nullptr)); | 486 message_loop.task_runner())); |
487 | 487 |
488 MockConstraintFactory constraint_factory; | 488 MockConstraintFactory constraint_factory; |
489 scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device( | 489 scoped_refptr<WebRtcAudioDeviceImpl> webrtc_audio_device( |
490 new WebRtcAudioDeviceImpl()); | 490 new WebRtcAudioDeviceImpl()); |
491 scoped_refptr<MediaStreamAudioProcessor> audio_processor( | 491 scoped_refptr<MediaStreamAudioProcessor> audio_processor( |
492 new rtc::RefCountedObject<MediaStreamAudioProcessor>( | 492 new rtc::RefCountedObject<MediaStreamAudioProcessor>( |
493 constraint_factory.CreateWebMediaConstraints(), input_device_params_, | 493 constraint_factory.CreateWebMediaConstraints(), input_device_params_, |
494 webrtc_audio_device.get())); | 494 webrtc_audio_device.get())); |
495 | 495 |
496 EXPECT_TRUE(audio_processor->aec_dump_message_filter_.get()); | 496 EXPECT_TRUE(audio_processor->aec_dump_message_filter_.get()); |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 kAudioProcessingSampleRate, | 587 kAudioProcessingSampleRate, |
588 kAudioProcessingNumberOfChannel, | 588 kAudioProcessingNumberOfChannel, |
589 kAudioProcessingSampleRate / 100); | 589 kAudioProcessingSampleRate / 100); |
590 | 590 |
591 // Stop |audio_processor| so that it removes itself from | 591 // Stop |audio_processor| so that it removes itself from |
592 // |webrtc_audio_device| and clears its pointer to it. | 592 // |webrtc_audio_device| and clears its pointer to it. |
593 audio_processor->Stop(); | 593 audio_processor->Stop(); |
594 } | 594 } |
595 | 595 |
596 } // namespace content | 596 } // namespace content |
OLD | NEW |