med1844 / 2022-MUSI6106

Template project for assignments and exercises for the class MUSI6106
GNU General Public License v3.0
0 stars 0 forks source link

don't throw away your data #6

Open alexanderlerch opened 2 years ago

alexanderlerch commented 2 years ago

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