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 #include "webrtc/modules/audio_device/android/opensles_recorder.h" | 11 #include "webrtc/modules/audio_device/android/opensles_recorder.h" |
12 | 12 |
13 #include <android/log.h> | 13 #include <android/log.h> |
14 | 14 |
15 #include "webrtc/base/array_view.h" | |
16 #include "webrtc/base/arraysize.h" | |
17 #include "webrtc/base/checks.h" | |
18 #include "webrtc/base/format_macros.h" | |
19 #include "webrtc/base/timeutils.h" | |
20 #include "webrtc/modules/audio_device/android/audio_common.h" | 15 #include "webrtc/modules/audio_device/android/audio_common.h" |
21 #include "webrtc/modules/audio_device/android/audio_manager.h" | 16 #include "webrtc/modules/audio_device/android/audio_manager.h" |
22 #include "webrtc/modules/audio_device/fine_audio_buffer.h" | 17 #include "webrtc/modules/audio_device/fine_audio_buffer.h" |
| 18 #include "webrtc/rtc_base/array_view.h" |
| 19 #include "webrtc/rtc_base/arraysize.h" |
| 20 #include "webrtc/rtc_base/checks.h" |
| 21 #include "webrtc/rtc_base/format_macros.h" |
| 22 #include "webrtc/rtc_base/timeutils.h" |
23 | 23 |
24 #define TAG "OpenSLESRecorder" | 24 #define TAG "OpenSLESRecorder" |
25 #define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) | 25 #define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) |
26 #define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) | 26 #define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) |
27 #define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) | 27 #define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) |
28 #define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__) | 28 #define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__) |
29 #define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) | 29 #define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) |
30 | 30 |
31 #define LOG_ON_ERROR(op) \ | 31 #define LOG_ON_ERROR(op) \ |
32 [](SLresult err) { \ | 32 [](SLresult err) { \ |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 SLAndroidSimpleBufferQueueState state = GetBufferQueueState(); | 419 SLAndroidSimpleBufferQueueState state = GetBufferQueueState(); |
420 ALOGD("state.count:%d state.index:%d", state.count, state.index); | 420 ALOGD("state.count:%d state.index:%d", state.count, state.index); |
421 } | 421 } |
422 | 422 |
423 SLuint32 OpenSLESRecorder::GetBufferCount() { | 423 SLuint32 OpenSLESRecorder::GetBufferCount() { |
424 SLAndroidSimpleBufferQueueState state = GetBufferQueueState(); | 424 SLAndroidSimpleBufferQueueState state = GetBufferQueueState(); |
425 return state.count; | 425 return state.count; |
426 } | 426 } |
427 | 427 |
428 } // namespace webrtc | 428 } // namespace webrtc |
OLD | NEW |