4 ms·
One other comment. There are two rates: audio rate and control rate. Audio rate is "for each sample". Control rate is roughly "once per frame" i.e. once per buf
by seertaak 5y ago
One other comment. There are two rates: audio rate and control rate. Audio rate is "for each sample". Control rate is roughly "once per frame" i.e. once per buffer.
If you want to do anything useful you'll need a GUI which can control the parameters of the audio plugin. The GUI will communicate with the audio thread at control rate. The audio thread will usually pick up messages from the GUI via a ring buffer. And by the way, this can happen in reverse, e.g. for level meters, where you do a moving average of squared amplitude (RMS), and output this as a control rate. You can use ring buffers for this, but another approach is to use atomic variables. And in x86 architectures you can actually even use just regular variables because of its strong memory architecture.