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/modules/audio_device/test/audio_device_test_defines.h" | 17 #include "webrtc/modules/audio_device/test/audio_device_test_defines.h" |
18 | 18 |
19 #include "webrtc/test/gtest.h" | 19 #include "webrtc/test/gtest.h" |
20 #include "webrtc/test/testsupport/fileutils.h" | 20 #include "webrtc/test/testsupport/fileutils.h" |
21 | 21 |
22 #include "webrtc/modules/audio_device/audio_device_config.h" | 22 #include "webrtc/modules/audio_device/audio_device_config.h" |
23 #include "webrtc/modules/audio_device/audio_device_impl.h" | 23 #include "webrtc/modules/audio_device/audio_device_impl.h" |
| 24 #include "webrtc/modules/utility/include/process_thread.h" |
24 #include "webrtc/system_wrappers/include/sleep.h" | 25 #include "webrtc/system_wrappers/include/sleep.h" |
25 | 26 |
26 // Helper functions | 27 // Helper functions |
27 #if defined(ANDROID) | 28 #if defined(ANDROID) |
28 char filenameStr[2][256] = | 29 char filenameStr[2][256] = |
29 { {0}, | 30 { {0}, |
30 {0}, | 31 {0}, |
31 }; // Allow two buffers for those API calls taking two filenames | 32 }; // Allow two buffers for those API calls taking two filenames |
32 int currentStr = 0; | 33 int currentStr = 0; |
33 | 34 |
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 EXPECT_EQ(48000, sampleRate); | 1705 EXPECT_EQ(48000, sampleRate); |
1705 #elif defined(ANDROID) | 1706 #elif defined(ANDROID) |
1706 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); | 1707 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); |
1707 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000)); | 1708 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000)); |
1708 #elif defined(WEBRTC_IOS) | 1709 #elif defined(WEBRTC_IOS) |
1709 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); | 1710 TEST_LOG("Playout sample rate is %u\n\n", sampleRate); |
1710 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000) || | 1711 EXPECT_TRUE((sampleRate == 44000) || (sampleRate == 16000) || |
1711 (sampleRate == 8000)); | 1712 (sampleRate == 8000)); |
1712 #endif | 1713 #endif |
1713 } | 1714 } |
OLD | NEW |