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 #include "webrtc/modules/audio_device/android/audio_manager.h" | 11 #include "webrtc/modules/audio_device/android/audio_manager.h" |
12 #include "webrtc/modules/audio_device/android/audio_track_jni.h" | 12 #include "webrtc/modules/audio_device/android/audio_track_jni.h" |
13 | 13 |
14 #include <utility> | 14 #include <utility> |
15 | 15 |
16 #include <android/log.h> | 16 #include <android/log.h> |
17 | 17 |
18 #include "webrtc/rtc_base/arraysize.h" | 18 #include "webrtc/base/arraysize.h" |
19 #include "webrtc/rtc_base/checks.h" | 19 #include "webrtc/base/checks.h" |
20 #include "webrtc/rtc_base/format_macros.h" | 20 #include "webrtc/base/format_macros.h" |
21 | 21 |
22 #define TAG "AudioTrackJni" | 22 #define TAG "AudioTrackJni" |
23 #define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) | 23 #define ALOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__) |
24 #define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) | 24 #define ALOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__) |
25 #define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) | 25 #define ALOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__) |
26 #define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__) | 26 #define ALOGW(...) __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__) |
27 #define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) | 27 #define ALOGI(...) __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__) |
28 | 28 |
29 namespace webrtc { | 29 namespace webrtc { |
30 | 30 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 return; | 255 return; |
256 } | 256 } |
257 RTC_DCHECK_EQ(samples, frames_per_buffer_); | 257 RTC_DCHECK_EQ(samples, frames_per_buffer_); |
258 // Copy decoded data into common byte buffer to ensure that it can be | 258 // Copy decoded data into common byte buffer to ensure that it can be |
259 // written to the Java based audio track. | 259 // written to the Java based audio track. |
260 samples = audio_device_buffer_->GetPlayoutData(direct_buffer_address_); | 260 samples = audio_device_buffer_->GetPlayoutData(direct_buffer_address_); |
261 RTC_DCHECK_EQ(length, bytes_per_frame * samples); | 261 RTC_DCHECK_EQ(length, bytes_per_frame * samples); |
262 } | 262 } |
263 | 263 |
264 } // namespace webrtc | 264 } // namespace webrtc |
OLD | NEW |