Standalone: limiting the block size shown in the list

Hi guys,

is there a way to limit the minimum and maximum block size shown in the dropdown list?
We got a customer who set the block size to 8 samples, making the standalone crashing. Obviously, when he tried to reopen the app, it kept crashing.

Thanks,
Luca

1 Like

Not sure about your actual question, but maybe as a way to help the customer: You can delete the standalone preferences file (myApp.settings) and that will also clear the last buffer size.

audio software should always be designed to work with all block sizes so i’d suggest to fix it and push an update. low block sizes are useful because they trade performance for low latency and precise modulation. if some process requires buffers longer than 8 samples consider filling up a fifo like in the fft tutorial of juce

2 Likes

At 8 samples, you have <0.15 ms to do your processing. That’s probably not enough for many use cases (like calculating an fft).

I would suggest creating your own custom standalone wrapper instead of using the JUCE-provided one. Then you can add custom code to control the list shown to the user.

I know this sucks as an answer to your specific problem, because it doesn’t really answer your question, but I second this.
Trust me, when I tell you it’s more worth to fix the bug, than burry it under a setting so it doesn’t occur. Done it many times, didn’t end well once.

1 Like

Thank you all guys. I have a custom standalone wrapper based on the JUCE one. The problem is that none of my audio interfaces goes as low as 8 samples. I had no issues at 16 at all. I will try forcing the block size to 8 and see if I can replicate the issue, but as a temporary workaround I just wanted to know if there is a chance to limit that list. I assume not.

Thanks again!

So far, any attempt to replicate the issue has been useless. My FireFace 800 won’t go at 8 samples, while the minimum allowed block size is 16. Since I don’t want to get another audio interface just to replicate this bug, I’m asking again the same question I posted initially.

EDIT: solved in my own way. If anyone is having my same issue:

  1. You need to have your own standalone wrapper already
  2. Make a copy of juce_AudioDeviceSelectorComponent (juce_audio_utils/gui/) and make your own class based on this one.
  3. In the cpp file, find the method void updateBufferSizeComboBox (AudioIODevice* currentDevice)
  4. Locate the bufferSizeDropDown->addItem and do your changes there
  5. update your standalone wrapper to use your own AudioDeviceSelectorComponent class

Thanks,
Luca

1 Like

That’s pretty much what @benvining suggested above :slight_smile:

Legit fix!

1 Like