OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ |
12 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ | 12 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ |
13 | 13 |
14 #include <stddef.h> | 14 #include <stddef.h> |
15 #include <SLES/OpenSLES.h> | 15 #include <SLES/OpenSLES.h> |
16 | 16 |
| 17 #include "webrtc/rtc_base/checks.h" |
| 18 |
17 namespace webrtc { | 19 namespace webrtc { |
18 | 20 |
19 // Returns a string representation given an integer SL_RESULT_XXX code. | 21 // Returns a string representation given an integer SL_RESULT_XXX code. |
20 // The mapping can be found in <SLES/OpenSLES.h>. | 22 // The mapping can be found in <SLES/OpenSLES.h>. |
21 const char* GetSLErrorString(size_t code); | 23 const char* GetSLErrorString(size_t code); |
22 | 24 |
23 // Configures an SL_DATAFORMAT_PCM structure based on native audio parameters. | 25 // Configures an SL_DATAFORMAT_PCM structure based on native audio parameters. |
24 SLDataFormat_PCM CreatePCMConfiguration(size_t channels, | 26 SLDataFormat_PCM CreatePCMConfiguration(size_t channels, |
25 int sample_rate, | 27 int sample_rate, |
26 size_t bits_per_sample); | 28 size_t bits_per_sample); |
(...skipping 24 matching lines...) Expand all Loading... |
51 | 53 |
52 private: | 54 private: |
53 SLType obj_; | 55 SLType obj_; |
54 }; | 56 }; |
55 | 57 |
56 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf; | 58 typedef ScopedSLObject<SLObjectItf, const SLObjectItf_*> ScopedSLObjectItf; |
57 | 59 |
58 } // namespace webrtc | 60 } // namespace webrtc |
59 | 61 |
60 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ | 62 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_COMMON_H_ |
OLD | NEW |