What is the correct way to discern the block size for an AU plugin running under Logic Pro ?
My block size in logic is 128 but prepareToPlay is. being told 1024
Also when I change block size in Logic a jassert related to version hints gets triggered.
In prepareToPlay, you are given the maximum expected buffer size the host may use. The actual buffer size you have to process is given by the size of the buffer passed to processBlock.
and may be different with each call into
does that happen often (changing with each call into processBlock)?
Ableton stays the same until user changes block size in prefs.
I understand that Reaper uses dynamic block sizes in order to give smoother automation changes in VST2 (possibly other formats too if they don’t support per-sample automation?)
I do not have the stats on how often happens, or which softwares do what. but… the point is it does not matter how often it might happen. any host could change that at any time, as the spec allows it.
If you have some kind of plugin internal constraint for the buffer size (for example because you are doing FFT), you need to do some internal buffering in the plugin to make the buffer sizes compatible. You can’t assume the buffer sizes the host requests you to process follow some particular pattern. The only thing you can assume is that the processBlock buffers will be at maximum the size that was reported for prepareToPlay.
ableton and cubase. all other daws send variables blocks
Gotcha, I will code accordingly.
So the other part of the problem, I seem to need to increment my version hint constant for all params for each build.
Otherwise logic throws jassert:
jassert (wrapperType == wrapperType_Undefined || param->getVersionHint() != 0);
That’s fine, and incrementing the constant for each build works
I change the blockSize in logic audio prefs, and then it gets triggered even though the plugin is already open and working before
Why would changing audio block size trigger a version hint issue?
Doesn’t seem logical.
You don’t have to increment each time. It just must not be 0.