OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 // Failing when running on real iOS devices: bugs.webrtc.org/6889. | 591 // Failing when running on real iOS devices: bugs.webrtc.org/6889. |
592 TEST_F(AudioDeviceTest, DISABLED_StartStopPlayout) { | 592 TEST_F(AudioDeviceTest, DISABLED_StartStopPlayout) { |
593 StartPlayout(); | 593 StartPlayout(); |
594 StopPlayout(); | 594 StopPlayout(); |
595 StartPlayout(); | 595 StartPlayout(); |
596 StopPlayout(); | 596 StopPlayout(); |
597 } | 597 } |
598 | 598 |
599 // Tests that recording can be initiated, started and stopped. No audio callback | 599 // Tests that recording can be initiated, started and stopped. No audio callback |
600 // is registered in this test. | 600 // is registered in this test. |
601 // Disabled due to failure: bugs.webrtc.org/7056 | 601 TEST_F(AudioDeviceTest, StartStopRecording) { |
602 TEST_F(AudioDeviceTest, DISABLED_StartStopRecording) { | |
603 StartRecording(); | 602 StartRecording(); |
604 StopRecording(); | 603 StopRecording(); |
605 StartRecording(); | 604 StartRecording(); |
606 StopRecording(); | 605 StopRecording(); |
607 } | 606 } |
608 | 607 |
609 // Verify that calling StopPlayout() will leave us in an uninitialized state | 608 // Verify that calling StopPlayout() will leave us in an uninitialized state |
610 // which will require a new call to InitPlayout(). This test does not call | 609 // which will require a new call to InitPlayout(). This test does not call |
611 // StartPlayout() while being uninitialized since doing so will hit a | 610 // StartPlayout() while being uninitialized since doing so will hit a |
612 // RTC_DCHECK. | 611 // RTC_DCHECK. |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 StartPlayout(); | 726 StartPlayout(); |
728 StartRecording(); | 727 StartRecording(); |
729 test_is_done_->Wait(kTestTimeOutInMilliseconds); | 728 test_is_done_->Wait(kTestTimeOutInMilliseconds); |
730 StopRecording(); | 729 StopRecording(); |
731 StopPlayout(); | 730 StopPlayout(); |
732 } | 731 } |
733 | 732 |
734 // Start playout and read audio from an external PCM file when the audio layer | 733 // Start playout and read audio from an external PCM file when the audio layer |
735 // asks for data to play out. Real audio is played out in this test but it does | 734 // asks for data to play out. Real audio is played out in this test but it does |
736 // not contain any explicit verification that the audio quality is perfect. | 735 // not contain any explicit verification that the audio quality is perfect. |
737 // Disabled due to failure: bugs.webrtc.org/7056 | 736 TEST_F(AudioDeviceTest, RunPlayoutWithFileAsSource) { |
738 TEST_F(AudioDeviceTest, DISABLED_RunPlayoutWithFileAsSource) { | |
739 // TODO(henrika): extend test when mono output is supported. | 737 // TODO(henrika): extend test when mono output is supported. |
740 EXPECT_EQ(1, playout_channels()); | 738 EXPECT_EQ(1, playout_channels()); |
741 NiceMock<MockAudioTransportIOS> mock(kPlayout); | 739 NiceMock<MockAudioTransportIOS> mock(kPlayout); |
742 const int num_callbacks = kFilePlayTimeInSec * kNumCallbacksPerSecond; | 740 const int num_callbacks = kFilePlayTimeInSec * kNumCallbacksPerSecond; |
743 std::string file_name = GetFileName(playout_sample_rate()); | 741 std::string file_name = GetFileName(playout_sample_rate()); |
744 std::unique_ptr<FileAudioStream> file_audio_stream( | 742 std::unique_ptr<FileAudioStream> file_audio_stream( |
745 new FileAudioStream(num_callbacks, file_name, playout_sample_rate())); | 743 new FileAudioStream(num_callbacks, file_name, playout_sample_rate())); |
746 mock.HandleCallbacks(test_is_done_.get(), file_audio_stream.get(), | 744 mock.HandleCallbacks(test_is_done_.get(), file_audio_stream.get(), |
747 num_callbacks); | 745 num_callbacks); |
748 // SetMaxPlayoutVolume(); | 746 // SetMaxPlayoutVolume(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 StopPlayout(); | 816 StopPlayout(); |
819 StopRecording(); | 817 StopRecording(); |
820 // Verify that the correct number of transmitted impulses are detected. | 818 // Verify that the correct number of transmitted impulses are detected. |
821 EXPECT_EQ(latency_audio_stream->num_latency_values(), | 819 EXPECT_EQ(latency_audio_stream->num_latency_values(), |
822 static_cast<size_t>( | 820 static_cast<size_t>( |
823 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); | 821 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); |
824 latency_audio_stream->PrintResults(); | 822 latency_audio_stream->PrintResults(); |
825 } | 823 } |
826 | 824 |
827 } // namespace webrtc | 825 } // namespace webrtc |
OLD | NEW |