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

Side by Side Diff: webrtc/modules/audio_device/ios/audio_device_unittest_ios.cc

Issue 1314463003: More iOS compile fixes. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 mock.HandleCallbacks(test_is_done_.get(), fifo_audio_stream.get(), 746 mock.HandleCallbacks(test_is_done_.get(), fifo_audio_stream.get(),
747 kFullDuplexTimeInSec * kNumCallbacksPerSecond); 747 kFullDuplexTimeInSec * kNumCallbacksPerSecond);
748 // SetMaxPlayoutVolume(); 748 // SetMaxPlayoutVolume();
749 EXPECT_EQ(0, audio_device()->RegisterAudioCallback(&mock)); 749 EXPECT_EQ(0, audio_device()->RegisterAudioCallback(&mock));
750 StartRecording(); 750 StartRecording();
751 StartPlayout(); 751 StartPlayout();
752 test_is_done_->Wait( 752 test_is_done_->Wait(
753 std::max(kTestTimeOutInMilliseconds, 1000 * kFullDuplexTimeInSec)); 753 std::max(kTestTimeOutInMilliseconds, 1000 * kFullDuplexTimeInSec));
754 StopPlayout(); 754 StopPlayout();
755 StopRecording(); 755 StopRecording();
756 EXPECT_LE(fifo_audio_stream->average_size(), 10); 756 EXPECT_LE(fifo_audio_stream->average_size(), 10u);
757 EXPECT_LE(fifo_audio_stream->largest_size(), 20); 757 EXPECT_LE(fifo_audio_stream->largest_size(), 20u);
758 } 758 }
759 759
760 // Measures loopback latency and reports the min, max and average values for 760 // Measures loopback latency and reports the min, max and average values for
761 // a full duplex audio session. 761 // a full duplex audio session.
762 // The latency is measured like so: 762 // The latency is measured like so:
763 // - Insert impulses periodically on the output side. 763 // - Insert impulses periodically on the output side.
764 // - Detect the impulses on the input side. 764 // - Detect the impulses on the input side.
765 // - Measure the time difference between the transmit time and receive time. 765 // - Measure the time difference between the transmit time and receive time.
766 // - Store time differences in a vector and calculate min, max and average. 766 // - Store time differences in a vector and calculate min, max and average.
767 // This test requires a special hardware called Audio Loopback Dongle. 767 // This test requires a special hardware called Audio Loopback Dongle.
(...skipping 10 matching lines...) Expand all
778 // SetMaxPlayoutVolume(); 778 // SetMaxPlayoutVolume();
779 // DisableBuiltInAECIfAvailable(); 779 // DisableBuiltInAECIfAvailable();
780 StartRecording(); 780 StartRecording();
781 StartPlayout(); 781 StartPlayout();
782 test_is_done_->Wait( 782 test_is_done_->Wait(
783 std::max(kTestTimeOutInMilliseconds, 1000 * kMeasureLatencyTimeInSec)); 783 std::max(kTestTimeOutInMilliseconds, 1000 * kMeasureLatencyTimeInSec));
784 StopPlayout(); 784 StopPlayout();
785 StopRecording(); 785 StopRecording();
786 // Verify that the correct number of transmitted impulses are detected. 786 // Verify that the correct number of transmitted impulses are detected.
787 EXPECT_EQ(latency_audio_stream->num_latency_values(), 787 EXPECT_EQ(latency_audio_stream->num_latency_values(),
788 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1); 788 static_cast<size_t>(
789 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
789 latency_audio_stream->PrintResults(); 790 latency_audio_stream->PrintResults();
790 } 791 }
791 792
792 } // namespace webrtc 793 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698