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