OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 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 |
11 #include <algorithm> | 11 #include <algorithm> |
12 #include <cstring> | 12 #include <cstring> |
13 #include <numeric> | 13 #include <numeric> |
14 | 14 |
15 #include "webrtc/base/array_view.h" | 15 #include "webrtc/base/array_view.h" |
16 #include "webrtc/base/buffer.h" | 16 #include "webrtc/base/buffer.h" |
17 #include "webrtc/base/criticalsection.h" | 17 #include "webrtc/base/criticalsection.h" |
18 #include "webrtc/base/event.h" | 18 #include "webrtc/base/event.h" |
19 #include "webrtc/base/logging.h" | 19 #include "webrtc/base/logging.h" |
20 #include "webrtc/base/optional.h" | 20 #include "webrtc/base/optional.h" |
21 #include "webrtc/base/race_checker.h" | 21 #include "webrtc/base/race_checker.h" |
22 #include "webrtc/base/safe_conversions.h" | 22 #include "webrtc/base/safe_conversions.h" |
23 #include "webrtc/base/scoped_ref_ptr.h" | 23 #include "webrtc/base/scoped_ref_ptr.h" |
24 #include "webrtc/base/thread_annotations.h" | 24 #include "webrtc/base/thread_annotations.h" |
25 #include "webrtc/base/thread_checker.h" | 25 #include "webrtc/base/thread_checker.h" |
26 #include "webrtc/base/timeutils.h" | 26 #include "webrtc/base/timeutils.h" |
27 #include "webrtc/modules/audio_device/audio_device_impl.h" | 27 #include "webrtc/modules/audio_device/audio_device_impl.h" |
28 #include "webrtc/modules/audio_device/include/audio_device.h" | 28 #include "webrtc/modules/audio_device/include/audio_device.h" |
29 #include "webrtc/modules/audio_device/include/mock_audio_transport.h" | 29 #include "webrtc/modules/audio_device/include/mock_audio_transport.h" |
30 #include "webrtc/system_wrappers/include/sleep.h" | |
31 #include "webrtc/test/gmock.h" | 30 #include "webrtc/test/gmock.h" |
32 #include "webrtc/test/gtest.h" | 31 #include "webrtc/test/gtest.h" |
33 | 32 |
34 using ::testing::_; | 33 using ::testing::_; |
35 using ::testing::AtLeast; | 34 using ::testing::AtLeast; |
36 using ::testing::Ge; | 35 using ::testing::Ge; |
37 using ::testing::Invoke; | 36 using ::testing::Invoke; |
38 using ::testing::NiceMock; | 37 using ::testing::NiceMock; |
39 using ::testing::NotNull; | 38 using ::testing::NotNull; |
40 | 39 |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 StopPlayout(); | 690 StopPlayout(); |
692 // Verify that the correct number of transmitted impulses are detected. | 691 // Verify that the correct number of transmitted impulses are detected. |
693 EXPECT_EQ(audio_stream.num_latency_values(), | 692 EXPECT_EQ(audio_stream.num_latency_values(), |
694 static_cast<size_t>( | 693 static_cast<size_t>( |
695 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); | 694 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); |
696 // Print out min, max and average delay values for debugging purposes. | 695 // Print out min, max and average delay values for debugging purposes. |
697 audio_stream.PrintResults(); | 696 audio_stream.PrintResults(); |
698 } | 697 } |
699 | 698 |
700 } // namespace webrtc | 699 } // namespace webrtc |
OLD | NEW |