LCOV - code coverage report
Current view: top level - Tools - DecimationFilter.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 DecimationFilter.h
       3             :  */
       4             : 
       5             : #ifndef ATK_TOOLS_DECIMATIONFILTER_H
       6             : #define ATK_TOOLS_DECIMATIONFILTER_H
       7             : 
       8             : #include <ATK/Core/TypedBaseFilter.h>
       9             : #include <ATK/Tools/config.h>
      10             : 
      11             : namespace ATK
      12             : {
      13             :   /// Slows the sampling rate of an input signal by a constant rate
      14             :   template<class DataType_>
      15             :   class ATK_TOOLS_EXPORT DecimationFilter final : public TypedBaseFilter<DataType_>
      16             :   {
      17             :   protected:
      18             :     /// Simplify parent calls
      19             :     using Parent = TypedBaseFilter<DataType_>;
      20             :     using typename Parent::DataType;
      21             :     using Parent::converted_inputs;
      22             :     using Parent::outputs;
      23             :     using Parent::input_sampling_rate;
      24             :     using Parent::output_sampling_rate;
      25             :     using Parent::nb_input_ports;
      26             :     using Parent::nb_output_ports;
      27             : 
      28             :     /// Decimation factor, also the ratio between input and output sampling rate
      29             :     int decimation;
      30             : 
      31             :   public:
      32             :     /*!
      33             :     * @brief Constructor
      34             :     * @param nb_channels is the number of input and output channels
      35             :     */
      36             :     explicit DecimationFilter(gsl::index nb_channels = 1);
      37             :     /// Destructor
      38          17 :     ~DecimationFilter() override = default;
      39             :     
      40             :   protected:
      41             :     void process_impl(gsl::index size) const final;
      42             :     void setup() final;
      43             :   };
      44             : }
      45             : 
      46             : #endif

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