OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 <math.h> | 11 #include <math.h> |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 #include <string.h> | 13 #include <string.h> |
14 | 14 |
15 #include <memory> | 15 #include <memory> |
16 | 16 |
17 #include "webrtc/base/location.h" | |
18 #include "webrtc/modules/audio_device/audio_device_config.h" | 17 #include "webrtc/modules/audio_device/audio_device_config.h" |
19 #include "webrtc/modules/audio_device/audio_device_impl.h" | 18 #include "webrtc/modules/audio_device/audio_device_impl.h" |
20 #include "webrtc/modules/audio_device/test/audio_device_test_defines.h" | 19 #include "webrtc/modules/audio_device/test/audio_device_test_defines.h" |
21 #include "webrtc/modules/utility/include/process_thread.h" | 20 #include "webrtc/modules/utility/include/process_thread.h" |
| 21 #include "webrtc/rtc_base/location.h" |
22 #include "webrtc/system_wrappers/include/sleep.h" | 22 #include "webrtc/system_wrappers/include/sleep.h" |
23 #include "webrtc/test/gtest.h" | 23 #include "webrtc/test/gtest.h" |
24 #include "webrtc/test/testsupport/fileutils.h" | 24 #include "webrtc/test/testsupport/fileutils.h" |
25 | 25 |
26 // Helper functions | 26 // Helper functions |
27 #if defined(ANDROID) | 27 #if defined(ANDROID) |
28 char filenameStr[2][256] = | 28 char filenameStr[2][256] = |
29 { {0}, | 29 { {0}, |
30 {0}, | 30 {0}, |
31 }; // Allow two buffers for those API calls taking two filenames | 31 }; // Allow two buffers for those API calls taking two filenames |
(...skipping 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1599 EXPECT_EQ(48000, sampleRate); | 1599 EXPECT_EQ(48000, sampleRate); |
1600 #elif defined(ANDROID) | 1600 #elif defined(ANDROID) |
1601 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); | 1601 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); |
1602 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000)); | 1602 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000)); |
1603 #elif defined(WEBRTC_IOS) | 1603 #elif defined(WEBRTC_IOS) |
1604 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); | 1604 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); |
1605 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000) || | 1605 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000) || |
1606 (sampleRate == 8000)); | 1606 (sampleRate == 8000)); |
1607 #endif | 1607 #endif |
1608 } | 1608 } |
OLD | NEW |