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

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

Issue 2402883003: Removes usage of hardware AGC and any related APIs on Android (Closed)
Patch Set: Created 4 years, 2 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/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 8ce13861a448d54debbbf8f7b25f113a8d65c3b8..a02bbd5f0c6258b1d0964b9613f25015490440df 100644
--- a/webrtc/modules/audio_device/android/audio_record_jni.cc
+++ b/webrtc/modules/audio_device/android/audio_record_jni.cc
@@ -37,7 +37,6 @@ AudioRecordJni::JavaAudioRecord::JavaAudioRecord(
start_recording_(native_reg->GetMethodId("startRecording", "()Z")),
stop_recording_(native_reg->GetMethodId("stopRecording", "()Z")),
enable_built_in_aec_(native_reg->GetMethodId("enableBuiltInAEC", "(Z)Z")),
- enable_built_in_agc_(native_reg->GetMethodId("enableBuiltInAGC", "(Z)Z")),
enable_built_in_ns_(native_reg->GetMethodId("enableBuiltInNS", "(Z)Z")) {}
AudioRecordJni::JavaAudioRecord::~JavaAudioRecord() {}
@@ -62,11 +61,6 @@ bool AudioRecordJni::JavaAudioRecord::EnableBuiltInAEC(bool enable) {
static_cast<jboolean>(enable));
}
-bool AudioRecordJni::JavaAudioRecord::EnableBuiltInAGC(bool enable) {
- return audio_record_->CallBooleanMethod(enable_built_in_agc_,
- static_cast<jboolean>(enable));
-}
-
bool AudioRecordJni::JavaAudioRecord::EnableBuiltInNS(bool enable) {
return audio_record_->CallBooleanMethod(enable_built_in_ns_,
static_cast<jboolean>(enable));
@@ -201,9 +195,9 @@ int32_t AudioRecordJni::EnableBuiltInAEC(bool enable) {
}
int32_t AudioRecordJni::EnableBuiltInAGC(bool enable) {
- ALOGD("EnableBuiltInAGC%s", GetThreadInfo().c_str());
- RTC_DCHECK(thread_checker_.CalledOnValidThread());
- return j_audio_record_->EnableBuiltInAGC(enable) ? 0 : -1;
+ // TODO(henrika): possibly remove when no longer used by any client.
+ FATAL() << "Should never be called";
+ return -1;
}
int32_t AudioRecordJni::EnableBuiltInNS(bool enable) {

Powered by Google App Engine
This is Rietveld 408576698