tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

transparent_mode.h (1614B)


      1 /*
      2 *  Copyright (c) 2020 The WebRTC project authors. All Rights Reserved.
      3 *
      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
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #ifndef MODULES_AUDIO_PROCESSING_AEC3_TRANSPARENT_MODE_H_
     12 #define MODULES_AUDIO_PROCESSING_AEC3_TRANSPARENT_MODE_H_
     13 
     14 #include <memory>
     15 
     16 #include "api/audio/echo_canceller3_config.h"
     17 #include "api/environment/environment.h"
     18 
     19 namespace webrtc {
     20 
     21 // Class for detecting and toggling the transparent mode which causes the
     22 // suppressor to apply less suppression.
     23 class TransparentMode {
     24 public:
     25  static std::unique_ptr<TransparentMode> Create(
     26      const Environment& env,
     27      const EchoCanceller3Config& config);
     28 
     29  virtual ~TransparentMode() {}
     30 
     31  // Returns whether the transparent mode should be active.
     32  virtual bool Active() const = 0;
     33 
     34  // Resets the state of the detector.
     35  virtual void Reset() = 0;
     36 
     37  // Updates the detection decision based on new data.
     38  virtual void Update(int filter_delay_blocks,
     39                      bool any_filter_consistent,
     40                      bool any_filter_converged,
     41                      bool any_coarse_filter_converged,
     42                      bool all_filters_diverged,
     43                      bool active_render,
     44                      bool saturated_capture) = 0;
     45 };
     46 
     47 }  // namespace webrtc
     48 #endif  // MODULES_AUDIO_PROCESSING_AEC3_TRANSPARENT_MODE_H_