tor-browser

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

subtractor_output_analyzer.h (1446B)


      1 /*
      2 *  Copyright (c) 2018 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_SUBTRACTOR_OUTPUT_ANALYZER_H_
     12 #define MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_ANALYZER_H_
     13 
     14 #include <cstddef>
     15 #include <vector>
     16 
     17 #include "api/array_view.h"
     18 #include "modules/audio_processing/aec3/subtractor_output.h"
     19 
     20 namespace webrtc {
     21 
     22 // Class for analyzing the properties subtractor output.
     23 class SubtractorOutputAnalyzer {
     24 public:
     25  explicit SubtractorOutputAnalyzer(size_t num_capture_channels);
     26  ~SubtractorOutputAnalyzer() = default;
     27 
     28  // Analyses the subtractor output.
     29  void Update(ArrayView<const SubtractorOutput> subtractor_output,
     30              bool* any_filter_converged,
     31              bool* any_coarse_filter_converged,
     32              bool* all_filters_diverged);
     33 
     34  const std::vector<bool>& ConvergedFilters() const {
     35    return filters_converged_;
     36  }
     37 
     38  // Handle echo path change.
     39  void HandleEchoPathChange();
     40 
     41 private:
     42  std::vector<bool> filters_converged_;
     43 };
     44 
     45 }  // namespace webrtc
     46 
     47 #endif  // MODULES_AUDIO_PROCESSING_AEC3_SUBTRACTOR_OUTPUT_ANALYZER_H_