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 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 // Delay estimate of the total round-trip delay (input + output). | 129 // Delay estimate of the total round-trip delay (input + output). |
130 // Fixed value set once in AttachAudioBuffer() and it can take one out of two | 130 // Fixed value set once in AttachAudioBuffer() and it can take one out of two |
131 // possible values. See audio_common.h for details. | 131 // possible values. See audio_common.h for details. |
132 int total_delay_in_milliseconds_; | 132 int total_delay_in_milliseconds_; |
133 | 133 |
134 // Cached copy of address to direct audio buffer owned by |j_audio_record_|. | 134 // Cached copy of address to direct audio buffer owned by |j_audio_record_|. |
135 void* direct_buffer_address_; | 135 void* direct_buffer_address_; |
136 | 136 |
137 // Number of bytes in the direct audio buffer owned by |j_audio_record_|. | 137 // Number of bytes in the direct audio buffer owned by |j_audio_record_|. |
138 int direct_buffer_capacity_in_bytes_; | 138 size_t direct_buffer_capacity_in_bytes_; |
139 | 139 |
140 // Number audio frames per audio buffer. Each audio frame corresponds to | 140 // Number audio frames per audio buffer. Each audio frame corresponds to |
141 // one sample of PCM mono data at 16 bits per sample. Hence, each audio | 141 // one sample of PCM mono data at 16 bits per sample. Hence, each audio |
142 // frame contains 2 bytes (given that the Java layer only supports mono). | 142 // frame contains 2 bytes (given that the Java layer only supports mono). |
143 // Example: 480 for 48000 Hz or 441 for 44100 Hz. | 143 // Example: 480 for 48000 Hz or 441 for 44100 Hz. |
144 int frames_per_buffer_; | 144 size_t frames_per_buffer_; |
145 | 145 |
146 bool initialized_; | 146 bool initialized_; |
147 | 147 |
148 bool recording_; | 148 bool recording_; |
149 | 149 |
150 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the | 150 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the |
151 // AudioDeviceModuleImpl class and called by AudioDeviceModuleImpl::Create(). | 151 // AudioDeviceModuleImpl class and called by AudioDeviceModuleImpl::Create(). |
152 AudioDeviceBuffer* audio_device_buffer_; | 152 AudioDeviceBuffer* audio_device_buffer_; |
153 }; | 153 }; |
154 | 154 |
155 } // namespace webrtc | 155 } // namespace webrtc |
156 | 156 |
157 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ | 157 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_RECORD_JNI_H_ |
OLD | NEW |