Line data Source code
1 : /** 2 : * \file CustomIIRFilter.cpp 3 : */ 4 : 5 : #include "CustomIIRFilter.h" 6 : #include <ATK/EQ/config.h> 7 : 8 : #include <boost/math/constants/constants.hpp> 9 : 10 : #include <cassert> 11 : #include <cmath> 12 : #include <complex> 13 : 14 : namespace ATK 15 : { 16 : template <typename DataType> 17 0 : CustomIIRCoefficients<DataType>::CustomIIRCoefficients(gsl::index nb_channels) 18 0 : :Parent(nb_channels, nb_channels) 19 : { 20 0 : } 21 : 22 : template<typename DataType_> 23 0 : void ATK::CustomIIRCoefficients<DataType_>::set_coefficients_in(const std::vector<typename TypeTraits<DataType>::Scalar>& coefficients_in ) 24 : { 25 0 : in_order = static_cast<int>(coefficients_in.size() - 1); 26 0 : this->coefficients_in.assign(coefficients_in.begin(), coefficients_in.end()); 27 : 28 0 : setup(); 29 0 : } 30 : 31 : template<typename DataType_> 32 0 : void ATK::CustomIIRCoefficients<DataType_>::set_coefficients_out(const std::vector<typename TypeTraits<DataType>::Scalar>& coefficients_out ) 33 : { 34 0 : out_order = static_cast<int>(coefficients_out.size()); 35 0 : this->coefficients_out.assign(coefficients_out.begin(), coefficients_out.end()); 36 : 37 0 : setup(); 38 0 : } 39 : 40 : #if ATK_ENABLE_INSTANTIATION 41 : template class ATK_EQ_EXPORT CustomIIRCoefficients<float>; 42 : template class ATK_EQ_EXPORT CustomIIRCoefficients<std::complex<float>>; 43 : template class ATK_EQ_EXPORT CustomIIRCoefficients<std::complex<double>>; 44 : #endif 45 : template class ATK_EQ_EXPORT CustomIIRCoefficients<double>; 46 : }