Device Buffer Size Ignored (MacOS)

Hi,

I’m developing an audio plugin (VST3) in JUCE that I’ve been testing in Dorico and noticing some extremely strange behaviours related to the device buffer size. It seems to me that the buffer size is not respected at all and always defaults to 512 on playback, independently of what I set it to in the Device Control Panel:

I’ve tried this with multiple devices (MOTU UltraLite mk5, Focusrite 2i2, headphones, built-in, Blackhole) and multiple different values for the buffer size, but the buffer size provided by JUCE’s AudioProcessor::prepareToPlay and the buffer size of the provided audio buffer in AudioProcessor::processBlock always seems to default to 512.

Could it be that I’m doing something wrong, or is the buffer size setting actually ignored here?

If needed, I can provide you with a minimal plugin for testing the buffer size!

I’m running Dorico 5.1.60.2187 (I can update to 6 if needed) on MacOS 15.2 (MacBook Pro 14" 2023 / M2 Pro).

1 Like

Interesting. And the CoreAudio Device Settings show a different buffer size than what you see elsewhere?
Yes, please, send me your plug-in and we’ll have a look. Does that plug-in only run in Dorico or also in Cubase or other DAWs?
You can send to u dot stoermer at steinberg dot de
Thanks

2 Likes

Hi Ulf,

I apologize for the late reply, I sent the mail just before I went on vacation and then forgot about it.

Yes, the plugin should run in any DAW, I’ll send you a separate mail with the details!

Most DAWs have their own interface for setting so comparing the settings in Dorico with other DAWs isn’t really meaningful. Just a few examples from the environments I regularly use:

(Ableton Live)

(Max MSP)

(Bespoke Synth)

Thanks for the plug-in, I succesfully installed it now and quite to your surprise - I guess - I have to report you, that everything is normal what you see.
How come?
Well, the reason is ASIO-Guard. I suppose you don’t have Cubase because there you can see this all more clearly.
To start explaining from the beginning, one has to know about the Cubase audio engine, because also Dorico’s audio engine is directly derived from that audio engine.
Some 13 years ago we introduced ASIO-Guard in Cubase 7. The internal name for this was (and still is) Prefetch Processing. The idea behind that is, if in a DAW you only play back a piece then you can “look into ahead into the future”, namely prefetch more and bigger buffers and process them already way ahead of their real scheduling on the timeline. This helps easing out and flattening the average audio engine load, which results in a much better performance and therefore less risk of running into drop out situations.
Coming back to the buffer sizes that you see: Dorico’s audio engine also uses ASIO-Guard, though you can also switch it off in the Dorico Preferences, but unlike Cubase there is no GUI where you can interact with the ASIO-Guard settings. You can change the value by editing some XML file, but it’s rather tedious and error prone. In Dorico by default ASIO Guard Level is Medium , and that results in those 512 samples,. If you’d set it to Low, it becomes 256 or even 1024 when used with Large buffersize.
I’d recommend to get a Cubase trial version, because there in the Studio Setup you have a full GUI for ASIO-Guard settings, so you could try out there and also play with the values, you can then immediately see how applying changes in some values, can have a big impact on the used buffersize. E.g. if one channel goes into live mode or record enable, then you can see buffer size dropping to the value has in the Device Control Panel. Another parameter that has an influence is the Multi Processing flag..
As said, also in Dorico you can change all those values, but you have to know where to find them in the defaults or preferences.xml and you have to restart Dorico in order for them to take effect. Cubase on the other hand has an Apply button so you can immediately see/hear the result.
I don’t know, does my explanation make sense? As I said, probably it’s best to get a Cubase trial and play around with it, then most likely you will understand.