Allocating memory during a parameter setting function might be a bad idea - just imagine the user has a floating point slider that send parameter updates while moving, also you don't want to remove all existing samples in the buffer; furthermore, there is no need destroying and instantiating the ringbuffer if the new delay value is smaller than the previous
https://github.com/medioqrity/2022-MUSI6106/blob/e16003d68633aeb13cdd4f77be47d3caf85460e1/src/CombFilter/CombFilter.cpp#L50
Allocating memory during a parameter setting function might be a bad idea - just imagine the user has a floating point slider that send parameter updates while moving, also you don't want to remove all existing samples in the buffer; furthermore, there is no need destroying and instantiating the ringbuffer if the new delay value is smaller than the previous