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

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

Issue 3009193002: Improves stereo/mono audio support on Android (Closed)
Patch Set: nit Created 3 years, 3 months 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/opensles_recorder.cc
diff --git a/webrtc/modules/audio_device/android/opensles_recorder.cc b/webrtc/modules/audio_device/android/opensles_recorder.cc
index e3a6e61ab024658700c1cb632fba993333fc1da8..df94ba8e156f64a5b68fe7d608247ca9c4013192 100644
--- a/webrtc/modules/audio_device/android/opensles_recorder.cc
+++ b/webrtc/modules/audio_device/android/opensles_recorder.cc
@@ -76,6 +76,11 @@ OpenSLESRecorder::~OpenSLESRecorder() {
int OpenSLESRecorder::Init() {
ALOGD("Init%s", GetThreadInfo().c_str());
RTC_DCHECK(thread_checker_.CalledOnValidThread());
+ if (audio_parameters_.channels() == 2) {
+ // TODO(henrika): FineAudioBuffer needs more work to support stereo.
+ ALOGE("OpenSLESRecorder does not support stereo");
+ return -1;
+ }
return 0;
}
« no previous file with comments | « webrtc/modules/audio_device/android/opensles_player.cc ('k') | webrtc/modules/audio_device/audio_device_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698