buffer.getNumSamples() returning incorrect values

I understand that the number can change and may not be the same as set in the DAW.

I have an object that updates state and is displayed by an AnimatedAppComponent at 30Hz. Because the object updates state from the processBlock, I can see approximately how fast it’s updating.

I have my DAW’s buffer set to 8,192 samples, however, when checking in the process block, the buffer length is said to be 212 samples. I can tell that the buffer length listed in the DAW seems accurate because the AnimatedAppComponent is choppy (it would be smooth if it were a 212 sample buffer), so the 186ms listed in the DAW seems accurate. So, why is the buffer.getNumSamples() returning such a different value?

When using AudioPluginHost, the sample count reads accurately. It’s in FL Studio that the sample count is reading so differently.

Checking through the process, the changing object data does seem to be updating every 42ms, which is about 24Hz (I have update rate limited to 31Hz). This would suggest that the data is updating quickly. The animation is definitely way slower, however, to the point where I can count maybe 4 or 5 updates a second. I’m now wondering if the AnimatedAppComponent is slowing down its refresh rate with a larger buffer size set in FL Studio. Is this possible? And can this be checked?

I checked another plugin, and it turns out that that plugin’s screen refresh rate is also slowed down, so the DAW is slowing down the GUI refresh is probably the reason. I hadn’t noticed it before.