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

Unified Diff: webrtc/modules/audio_device/android/audio_record_jni.cc

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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/android/audio_record_jni.cc
diff --git a/webrtc/modules/audio_device/android/audio_record_jni.cc b/webrtc/modules/audio_device/android/audio_record_jni.cc
index a02bbd5f0c6258b1d0964b9613f25015490440df..b826ef6883fc32633c0451ba24a50663742e4b5c 100644
--- a/webrtc/modules/audio_device/android/audio_record_jni.cc
+++ b/webrtc/modules/audio_device/android/audio_record_jni.cc
@@ -132,8 +132,9 @@ int32_t AudioRecordJni::InitRecording() {
}
frames_per_buffer_ = static_cast<size_t>(frames_per_buffer);
ALOGD("frames_per_buffer: %" PRIuS, frames_per_buffer_);
+ const size_t bytes_per_frame = audio_parameters_.channels() * sizeof(int16_t);
RTC_CHECK_EQ(direct_buffer_capacity_in_bytes_,
- frames_per_buffer_ * kBytesPerFrame);
+ frames_per_buffer_ * bytes_per_frame);
RTC_CHECK_EQ(frames_per_buffer_, audio_parameters_.frames_per_10ms_buffer());
initialized_ = true;
return 0;

Powered by Google App Engine
This is Rietveld 408576698