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

Unified Diff: webrtc/modules/audio_device/android/audio_device_template.h

Issue 1344563002: Improving support for Android Audio Effects in WebRTC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Improved comments Created 5 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
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | webrtc/modules/audio_device/android/audio_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_device/android/audio_device_template.h
diff --git a/webrtc/modules/audio_device/android/audio_device_template.h b/webrtc/modules/audio_device/android/audio_device_template.h
index 3935a63ee332a10313cc1d9a93cdcf4530b91eff..47e353dfd5472390e72de76d3b96a002d0cd0f78 100644
--- a/webrtc/modules/audio_device/android/audio_device_template.h
+++ b/webrtc/modules/audio_device/android/audio_device_template.h
@@ -460,6 +460,28 @@ class AudioDeviceTemplate : public AudioDeviceGeneric {
return input_.EnableBuiltInAEC(enable);
}
+ // Returns true if the device both supports built in AGC and the device
+ // is not blacklisted.
+ bool BuiltInAGCIsAvailable() const override {
+ return audio_manager_->IsAutomaticGainControlSupported();
+ }
+
+ int32_t EnableBuiltInAGC(bool enable) override {
+ RTC_CHECK(BuiltInAGCIsAvailable()) << "HW AGC is not available";
+ return input_.EnableBuiltInAGC(enable);
+ }
+
+ // Returns true if the device both supports built in NS and the device
+ // is not blacklisted.
+ bool BuiltInNSIsAvailable() const override {
+ return audio_manager_->IsNoiseSuppressorSupported();
+ }
+
+ int32_t EnableBuiltInNS(bool enable) override {
+ RTC_CHECK(BuiltInNSIsAvailable()) << "HW NS is not available";
+ return input_.EnableBuiltInNS(enable);
+ }
+
private:
rtc::ThreadChecker thread_checker_;
« no previous file with comments | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | webrtc/modules/audio_device/android/audio_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698