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