LCOV - code coverage report
Current view: top level - Reverberation - LowPassReverbFilter.h (source / functions) Hit Total Coverage
Test: coverage.info.cleaned Lines: 1 1 100.0 %
Date: 2021-02-18 20:07:22 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /**
       2             :  * \file LowPassReverbFilter.h
       3             :  */
       4             : 
       5             : #ifndef ATK_REVERBERATION_LOWPASSREVERBFILTER_H
       6             : #define ATK_REVERBERATION_LOWPASSREVERBFILTER_H
       7             : 
       8             : #include <ATK/Core/TypedBaseFilter.h>
       9             : #include <ATK/Reverberation/config.h>
      10             : 
      11             : #include <vector>
      12             : 
      13             : namespace ATK
      14             : {
      15             :   /// Simple low pass reverb filter
      16             :   template<typename DataType_>
      17             :   class ATK_REVERBERATION_EXPORT LowPassReverbFilter final : public TypedBaseFilter<DataType_>
      18             :   {
      19             :   protected:
      20             :     /// Simplify parent calls
      21             :     using Parent = TypedBaseFilter<DataType_>;
      22             :     using typename Parent::DataType;
      23             :     using Parent::converted_inputs;
      24             :     using Parent::input_delay;
      25             :     using Parent::outputs;
      26             :     using Parent::nb_input_ports;
      27             :     using Parent::nb_output_ports;
      28             :     using Parent::output_delay;
      29             : 
      30             :   public:
      31             :     /*!
      32             :     * @brief construct the filter with a maximum delay line size
      33             :     * @param max_delay is the maximum delay allowed
      34             :     */
      35             :     explicit LowPassReverbFilter(gsl::index max_delay);
      36             :     /// Destructor
      37          13 :     ~LowPassReverbFilter() override = default;
      38             : 
      39             :     /// Changes the delay used for the filter
      40             :     void set_delay(gsl::index delay);
      41             :     /// Returns the elay used for the system
      42             :     gsl::index get_delay() const;
      43             : 
      44             :     /// Sets feedback amount (sum of cutoff and feedback must be between 0 and 1)
      45             :     void set_feedback(DataType_ feedback);
      46             :     /// Gets feedback amount
      47             :     DataType_ get_feedback() const;
      48             :     /// Sets cutoff amount (sum of cutoff and feedback must be between 0 and 1)
      49             :     void set_cutoff(DataType_ cutoff);
      50             :     /// Gets cutoff amount
      51             :     DataType_ get_cutoff() const;
      52             :   protected:
      53             :     void process_impl(gsl::index size) const final;
      54             :   private:
      55             :     gsl::index delay{0};
      56             :     DataType_ feedback{0};
      57             :     DataType_ cutoff{0};
      58             :   };
      59             : }
      60             : 
      61             : #endif

Generated by: LCOV version TK-3.3.0-4-gdba42eea