From dc4b5cc37d640c31532de0e1ecaa6bb61bbdd4c9 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Fri, 23 Nov 2018 22:33:01 -0500 Subject: [PATCH] Effects `DefaultAttenuation` as an explicit default. --- SignalProcessing/FIRFilter.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/SignalProcessing/FIRFilter.hpp b/SignalProcessing/FIRFilter.hpp index aa3d2a542..c6c7e7e56 100644 --- a/SignalProcessing/FIRFilter.hpp +++ b/SignalProcessing/FIRFilter.hpp @@ -29,6 +29,8 @@ class FIRFilter { static constexpr int FixedShift = 15; public: + /*! A suggested default attenuation value. */ + constexpr static float DefaultAttenuation = 60.0f; /*! Creates an instance of @c FIRFilter. @@ -38,12 +40,9 @@ class FIRFilter { @param high_frequency The highest frequency of signal to retain in the output. @param attenuation The attenuation of the discarded frequencies. */ - FIRFilter(std::size_t number_of_taps, float input_sample_rate, float low_frequency, float high_frequency, float attenuation); + FIRFilter(std::size_t number_of_taps, float input_sample_rate, float low_frequency, float high_frequency, float attenuation = DefaultAttenuation); FIRFilter(const std::vector &coefficients); - /*! A suggested default attenuation value. */ - constexpr static float DefaultAttenuation = 60.0f; - /*! Applies the filter to one batch of input samples, returning the net result.