Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(660)

Side by Side Diff: webrtc/modules/audio_device/android/audio_track_jni.h

Issue 2499613002: Adds stereo support for Java-based input and output audio on Android (Closed)
Patch Set: Adds support for separate settings for input and output Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 // Number of bytes in the direct audio buffer owned by |j_audio_track_|. 133 // Number of bytes in the direct audio buffer owned by |j_audio_track_|.
134 size_t direct_buffer_capacity_in_bytes_; 134 size_t direct_buffer_capacity_in_bytes_;
135 135
136 // Number of audio frames per audio buffer. Each audio frame corresponds to 136 // Number of audio frames per audio buffer. Each audio frame corresponds to
137 // one sample of PCM mono data at 16 bits per sample. Hence, each audio 137 // one sample of PCM mono data at 16 bits per sample. Hence, each audio
138 // frame contains 2 bytes (given that the Java layer only supports mono). 138 // frame contains 2 bytes (given that the Java layer only supports mono).
139 // Example: 480 for 48000 Hz or 441 for 44100 Hz. 139 // Example: 480 for 48000 Hz or 441 for 44100 Hz.
140 size_t frames_per_buffer_; 140 size_t frames_per_buffer_;
141 141
142 // Number of bytes per audio frame assuming that all sampels are 16-bit linear
143 // PCM samples.
144 // Example: 4 bytes for stereo and 2 bytes for mono.
145 size_t bytes_per_frame_;
magjed_webrtc 2016/11/16 13:42:09 Do we need to store this as a member variable, or
henrika_webrtc 2016/11/16 13:56:38 Done.
146
142 bool initialized_; 147 bool initialized_;
143 148
144 bool playing_; 149 bool playing_;
145 150
146 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the 151 // Raw pointer handle provided to us in AttachAudioBuffer(). Owned by the
147 // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create(). 152 // AudioDeviceModuleImpl class and called by AudioDeviceModule::Create().
148 // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance 153 // The AudioDeviceBuffer is a member of the AudioDeviceModuleImpl instance
149 // and therefore outlives this object. 154 // and therefore outlives this object.
150 AudioDeviceBuffer* audio_device_buffer_; 155 AudioDeviceBuffer* audio_device_buffer_;
151 }; 156 };
152 157
153 } // namespace webrtc 158 } // namespace webrtc
154 159
155 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_ 160 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_TRACK_JNI_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/android/audio_record_jni.cc ('k') | webrtc/modules/audio_device/android/audio_track_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698