Hello everybody !
I have been studying filters and concurrency programming a little. I still don’t get everything from TheVinn discussions, about lock-free FIFOs and all that stuff ( :lol: ), but I have understood a few things. Then, I have looked for the class IIR filter that Jules has developed, to grab some information about what I should do in my plug-ins. So, I have a few questions about this class.
The class uses a CriticalSection, and the process is locked in its functions setCoefficients, copyCoefficientsFrom, makeInactive, reset, processSamples and in the destructor. If I make the choice of using critical sections in my plug-in instead of atomic variables or lock-free algorithms (like in VFLib), do I need to protect as many functions as I can see there ?
What should I do to evaluate the efficiency of any concurrent system ? I have well understood that the programs which need the most attention have to be more complicated than a simple filter (like a DAW, a modular synth, or effects like multi-threaded partitioned convolution…). But, if I use say 100 plug-ins in my sequencer, with 80+ % of CPU consumption in my project, and then if I instanciate a plug-in using a 2nd order filter, does the choice of one algorithm or another for concurrency will change something ?
Is there a simple and more robust way to protect the processes of this class than what has been done, using only JUCE classes ?
EDIT : I’m creating a new subject for the TDF2 implementation