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/api/array_view.h" | 15 #include "webrtc/api/array_view.h" |
| 16 #include "webrtc/api/optional.h" |
16 #include "webrtc/modules/audio_device/audio_device_impl.h" | 17 #include "webrtc/modules/audio_device/audio_device_impl.h" |
17 #include "webrtc/modules/audio_device/include/audio_device.h" | 18 #include "webrtc/modules/audio_device/include/audio_device.h" |
18 #include "webrtc/modules/audio_device/include/mock_audio_transport.h" | 19 #include "webrtc/modules/audio_device/include/mock_audio_transport.h" |
19 #include "webrtc/rtc_base/buffer.h" | 20 #include "webrtc/rtc_base/buffer.h" |
20 #include "webrtc/rtc_base/criticalsection.h" | 21 #include "webrtc/rtc_base/criticalsection.h" |
21 #include "webrtc/rtc_base/event.h" | 22 #include "webrtc/rtc_base/event.h" |
22 #include "webrtc/rtc_base/logging.h" | 23 #include "webrtc/rtc_base/logging.h" |
23 #include "webrtc/rtc_base/optional.h" | |
24 #include "webrtc/rtc_base/race_checker.h" | 24 #include "webrtc/rtc_base/race_checker.h" |
25 #include "webrtc/rtc_base/safe_conversions.h" | 25 #include "webrtc/rtc_base/safe_conversions.h" |
26 #include "webrtc/rtc_base/scoped_ref_ptr.h" | 26 #include "webrtc/rtc_base/scoped_ref_ptr.h" |
27 #include "webrtc/rtc_base/thread_annotations.h" | 27 #include "webrtc/rtc_base/thread_annotations.h" |
28 #include "webrtc/rtc_base/thread_checker.h" | 28 #include "webrtc/rtc_base/thread_checker.h" |
29 #include "webrtc/rtc_base/timeutils.h" | 29 #include "webrtc/rtc_base/timeutils.h" |
30 #include "webrtc/test/gmock.h" | 30 #include "webrtc/test/gmock.h" |
31 #include "webrtc/test/gtest.h" | 31 #include "webrtc/test/gtest.h" |
32 | 32 |
33 using ::testing::_; | 33 using ::testing::_; |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 StopPlayout(); | 690 StopPlayout(); |
691 // Verify that the correct number of transmitted impulses are detected. | 691 // Verify that the correct number of transmitted impulses are detected. |
692 EXPECT_EQ(audio_stream.num_latency_values(), | 692 EXPECT_EQ(audio_stream.num_latency_values(), |
693 static_cast<size_t>( | 693 static_cast<size_t>( |
694 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); | 694 kImpulseFrequencyInHz * kMeasureLatencyTimeInSec - 1)); |
695 // Print out min, max and average delay values for debugging purposes. | 695 // Print out min, max and average delay values for debugging purposes. |
696 audio_stream.PrintResults(); | 696 audio_stream.PrintResults(); |
697 } | 697 } |
698 | 698 |
699 } // namespace webrtc | 699 } // namespace webrtc |
OLD | NEW |