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

Side by Side Diff: webrtc/modules/audio_device/android/audio_device_unittest.cc

Issue 2391563002: Increase the threshold for RunPlayoutAndRecordingInFullDuplex. (Closed)
Patch Set: Nits. Created 4 years, 2 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 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 fifo_audio_stream.get(), 1013 fifo_audio_stream.get(),
1014 kFullDuplexTimeInSec * kNumCallbacksPerSecond); 1014 kFullDuplexTimeInSec * kNumCallbacksPerSecond);
1015 SetMaxPlayoutVolume(); 1015 SetMaxPlayoutVolume();
1016 EXPECT_EQ(0, audio_device()->RegisterAudioCallback(&mock)); 1016 EXPECT_EQ(0, audio_device()->RegisterAudioCallback(&mock));
1017 StartRecording(); 1017 StartRecording();
1018 StartPlayout(); 1018 StartPlayout();
1019 test_is_done_->Wait(std::max(kTestTimeOutInMilliseconds, 1019 test_is_done_->Wait(std::max(kTestTimeOutInMilliseconds,
1020 1000 * kFullDuplexTimeInSec)); 1020 1000 * kFullDuplexTimeInSec));
1021 StopPlayout(); 1021 StopPlayout();
1022 StopRecording(); 1022 StopRecording();
1023 EXPECT_LE(fifo_audio_stream->average_size(), 10u); 1023
1024 EXPECT_LE(fifo_audio_stream->largest_size(), 20u); 1024 // These thresholds are set rather high to accomodate differences in hardware
1025 // in several devices, so this test can be used in swarming.
1026 // See http://bugs.webrtc.org/6464
1027 EXPECT_LE(fifo_audio_stream->average_size(), 30u);
1028 EXPECT_LE(fifo_audio_stream->largest_size(), 40u);
1025 } 1029 }
1026 1030
1027 // Measures loopback latency and reports the min, max and average values for 1031 // Measures loopback latency and reports the min, max and average values for
1028 // a full duplex audio session. 1032 // a full duplex audio session.
1029 // The latency is measured like so: 1033 // The latency is measured like so:
1030 // - Insert impulses periodically on the output side. 1034 // - Insert impulses periodically on the output side.
1031 // - Detect the impulses on the input side. 1035 // - Detect the impulses on the input side.
1032 // - Measure the time difference between the transmit time and receive time. 1036 // - Measure the time difference between the transmit time and receive time.
1033 // - Store time differences in a vector and calculate min, max and average. 1037 // - Store time differences in a vector and calculate min, max and average.
1034 // This test requires a special hardware called Audio Loopback Dongle. 1038 // This test requires a special hardware called Audio Loopback Dongle.
(...skipping 17 matching lines...) Expand all
1052 StopPlayout(); 1056 StopPlayout();
1053 StopRecording(); 1057 StopRecording();
1054 // Verify that the correct number of transmitted impulses are detected. 1058 // Verify that the correct number of transmitted impulses are detected.
1055 EXPECT_EQ(latency_audio_stream->num_latency_values(), 1059 EXPECT_EQ(latency_audio_stream->num_latency_values(),
1056 static_cast<size_t>( 1060 static_cast<size_t>(
1057 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); 1061 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1));
1058 latency_audio_stream->PrintResults(); 1062 latency_audio_stream->PrintResults();
1059 } 1063 }
1060 1064
1061 } // namespace webrtc 1065 } // 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