| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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_RECORDER_H_ | 11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ |
| 12 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ | 12 #define WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ |
| 13 | 13 |
| 14 #include <SLES/OpenSLES.h> | 14 #include <SLES/OpenSLES.h> |
| 15 #include <SLES/OpenSLES_Android.h> | 15 #include <SLES/OpenSLES_Android.h> |
| 16 #include <SLES/OpenSLES_AndroidConfiguration.h> | 16 #include <SLES/OpenSLES_AndroidConfiguration.h> |
| 17 | 17 |
| 18 #include <memory> | 18 #include <memory> |
| 19 | 19 |
| 20 #include "webrtc/base/thread_checker.h" |
| 20 #include "webrtc/modules/audio_device/android/audio_common.h" | 21 #include "webrtc/modules/audio_device/android/audio_common.h" |
| 21 #include "webrtc/modules/audio_device/android/audio_manager.h" | 22 #include "webrtc/modules/audio_device/android/audio_manager.h" |
| 22 #include "webrtc/modules/audio_device/android/opensles_common.h" | 23 #include "webrtc/modules/audio_device/android/opensles_common.h" |
| 24 #include "webrtc/modules/audio_device/include/audio_device_defines.h" |
| 23 #include "webrtc/modules/audio_device/audio_device_generic.h" | 25 #include "webrtc/modules/audio_device/audio_device_generic.h" |
| 24 #include "webrtc/modules/audio_device/include/audio_device_defines.h" | |
| 25 #include "webrtc/modules/utility/include/helpers_android.h" | 26 #include "webrtc/modules/utility/include/helpers_android.h" |
| 26 #include "webrtc/rtc_base/thread_checker.h" | |
| 27 | 27 |
| 28 namespace webrtc { | 28 namespace webrtc { |
| 29 | 29 |
| 30 class FineAudioBuffer; | 30 class FineAudioBuffer; |
| 31 | 31 |
| 32 // Implements 16-bit mono PCM audio input support for Android using the | 32 // Implements 16-bit mono PCM audio input support for Android using the |
| 33 // C based OpenSL ES API. No calls from C/C++ to Java using JNI is done. | 33 // C based OpenSL ES API. No calls from C/C++ to Java using JNI is done. |
| 34 // | 34 // |
| 35 // An instance must be created and destroyed on one and the same thread. | 35 // An instance must be created and destroyed on one and the same thread. |
| 36 // All public methods must also be called on the same thread. A thread checker | 36 // All public methods must also be called on the same thread. A thread checker |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Example (kNumOfOpenSLESBuffers = 2): counts 0, 1, 0, 1, ... | 184 // Example (kNumOfOpenSLESBuffers = 2): counts 0, 1, 0, 1, ... |
| 185 int buffer_index_; | 185 int buffer_index_; |
| 186 | 186 |
| 187 // Last time the OpenSL ES layer delivered recorded audio data. | 187 // Last time the OpenSL ES layer delivered recorded audio data. |
| 188 uint32_t last_rec_time_; | 188 uint32_t last_rec_time_; |
| 189 }; | 189 }; |
| 190 | 190 |
| 191 } // namespace webrtc | 191 } // namespace webrtc |
| 192 | 192 |
| 193 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ | 193 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_OPENSLES_RECORDER_H_ |
| OLD | NEW |