| @@ -86,7 +86,13 @@ namespace IIR | |||||
| Note that this clears the processing state, but the type of filter and | Note that this clears the processing state, but the type of filter and | ||||
| its coefficients aren't changed. | its coefficients aren't changed. | ||||
| */ | */ | ||||
| void reset(); | |||||
| void reset() { reset (SampleType {0}); } | |||||
| /** Resets the filter's processing pipeline to a specific value. | |||||
| See @reset | |||||
| */ | |||||
| void reset (SampleType resetToValue); | |||||
| //============================================================================== | //============================================================================== | ||||
| /** Called before processing starts. */ | /** Called before processing starts. */ | ||||
| @@ -61,7 +61,7 @@ Filter<SampleType>::Filter (Coefficients<typename Filter<SampleType>::NumericTyp | |||||
| } | } | ||||
| template <typename SampleType> | template <typename SampleType> | ||||
| void Filter<SampleType>::reset() | |||||
| void Filter<SampleType>::reset (SampleType resetToValue) | |||||
| { | { | ||||
| auto newOrder = coefficients->getFilterOrder(); | auto newOrder = coefficients->getFilterOrder(); | ||||
| @@ -73,7 +73,7 @@ void Filter<SampleType>::reset() | |||||
| } | } | ||||
| for (size_t i = 0; i < order; ++i) | for (size_t i = 0; i < order; ++i) | ||||
| state[i] = SampleType {0}; | |||||
| state[i] = resetToValue; | |||||
| } | } | ||||
| template <typename SampleType> | template <typename SampleType> | ||||