1 /*
2  *  Copyright (c) 2019 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_NS_PRIOR_SIGNAL_MODEL_ESTIMATOR_H_
12 #define MODULES_AUDIO_PROCESSING_NS_PRIOR_SIGNAL_MODEL_ESTIMATOR_H_
13 
14 #include "modules/audio_processing/ns/histograms.h"
15 #include "modules/audio_processing/ns/prior_signal_model.h"
16 
17 namespace webrtc {
18 
19 // Estimator of the prior signal model parameters.
20 class PriorSignalModelEstimator {
21  public:
22   explicit PriorSignalModelEstimator(float lrt_initial_value);
23   PriorSignalModelEstimator(const PriorSignalModelEstimator&) = delete;
24   PriorSignalModelEstimator& operator=(const PriorSignalModelEstimator&) =
25       delete;
26 
27   // Updates the model estimate.
28   void Update(const Histograms& h);
29 
30   // Returns the estimated model.
get_prior_model()31   const PriorSignalModel& get_prior_model() const { return prior_model_; }
32 
33  private:
34   PriorSignalModel prior_model_;
35 };
36 
37 }  // namespace webrtc
38 
39 #endif  // MODULES_AUDIO_PROCESSING_NS_PRIOR_SIGNAL_MODEL_ESTIMATOR_H_
40