LCOV - code coverage report
Current view: top level - Reverberation - AllPassReverbFilter.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 AllPassReverbFilter.h
       3             :  */
       4             : 
       5             : #ifndef ATK_REVERBERATION_ALLPASSREVERBFILTER_H
       6             : #define ATK_REVERBERATION_ALLPASSREVERBFILTER_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 all pass reverb filter
      16             :   template<typename DataType_>
      17             :   class ATK_REVERBERATION_EXPORT AllPassReverbFilter 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::output_delay;
      27             : 
      28             :   public:
      29             :     /*!
      30             :     * @brief construct the filter with a maximum delay line size
      31             :     * @param max_delay is the maximum delay allowed
      32             :     */
      33             :     explicit AllPassReverbFilter(gsl::index max_delay);
      34             :     /// Destructor
      35           9 :     ~AllPassReverbFilter() override = default;
      36             : 
      37             :     /// Changes the delay used for the filter
      38             :     void set_delay(gsl::index delay);
      39             :     /// Returns the elay used for the system
      40             :     gsl::index get_delay() const;
      41             : 
      42             :     /// Sets feedback amount (between -1 and 1)
      43             :     void set_feedback(DataType_ feedback);
      44             :     /// Gets feedback amount
      45             :     DataType_ get_feedback() const;
      46             :   protected:
      47             :     void process_impl(gsl::index size) const final;
      48             : 
      49             :   private:
      50             :     gsl::index delay{0};
      51             :     DataType_ feedback{0};
      52             :   };
      53             : }
      54             : 
      55             : #endif

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