| OLD | NEW |
| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 // is not blacklisted. | 475 // is not blacklisted. |
| 476 bool BuiltInNSIsAvailable() const override { | 476 bool BuiltInNSIsAvailable() const override { |
| 477 return audio_manager_->IsNoiseSuppressorSupported(); | 477 return audio_manager_->IsNoiseSuppressorSupported(); |
| 478 } | 478 } |
| 479 | 479 |
| 480 int32_t EnableBuiltInNS(bool enable) override { | 480 int32_t EnableBuiltInNS(bool enable) override { |
| 481 RTC_CHECK(BuiltInNSIsAvailable()) << "HW NS is not available"; | 481 RTC_CHECK(BuiltInNSIsAvailable()) << "HW NS is not available"; |
| 482 return input_.EnableBuiltInNS(enable); | 482 return input_.EnableBuiltInNS(enable); |
| 483 } | 483 } |
| 484 | 484 |
| 485 // Returns true if the Intelligibility Enhancer is enabled |
| 486 bool IntelligibilityIsEnabled() const override { |
| 487 return audio_manager_->IsIntelligibilityEnhancerEnabled(); |
| 488 } |
| 489 |
| 485 private: | 490 private: |
| 486 rtc::ThreadChecker thread_checker_; | 491 rtc::ThreadChecker thread_checker_; |
| 487 | 492 |
| 488 // Local copy of the audio layer set during construction of the | 493 // Local copy of the audio layer set during construction of the |
| 489 // AudioDeviceModuleImpl instance. Read only value. | 494 // AudioDeviceModuleImpl instance. Read only value. |
| 490 const AudioDeviceModule::AudioLayer audio_layer_; | 495 const AudioDeviceModule::AudioLayer audio_layer_; |
| 491 | 496 |
| 492 // Non-owning raw pointer to AudioManager instance given to use at | 497 // Non-owning raw pointer to AudioManager instance given to use at |
| 493 // construction. The real object is owned by AudioDeviceModuleImpl and the | 498 // construction. The real object is owned by AudioDeviceModuleImpl and the |
| 494 // life time is the same as that of the AudioDeviceModuleImpl, hence there | 499 // life time is the same as that of the AudioDeviceModuleImpl, hence there |
| 495 // is no risk of reading a NULL pointer at any time in this class. | 500 // is no risk of reading a NULL pointer at any time in this class. |
| 496 AudioManager* const audio_manager_; | 501 AudioManager* const audio_manager_; |
| 497 | 502 |
| 498 OutputType output_; | 503 OutputType output_; |
| 499 | 504 |
| 500 InputType input_; | 505 InputType input_; |
| 501 | 506 |
| 502 bool initialized_; | 507 bool initialized_; |
| 503 }; | 508 }; |
| 504 | 509 |
| 505 } // namespace webrtc | 510 } // namespace webrtc |
| 506 | 511 |
| 507 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ | 512 #endif // WEBRTC_MODULES_AUDIO_DEVICE_ANDROID_AUDIO_DEVICE_TEMPLATE_H_ |
| OLD | NEW |