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.
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
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.
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.
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:
- You need to have your own standalone wrapper already
- Make a copy of juce_AudioDeviceSelectorComponent (juce_audio_utils/gui/) and make your own class based on this one.
- In the cpp file, find the method
void updateBufferSizeComboBox (AudioIODevice* currentDevice)
- Locate the bufferSizeDropDown->addItem and do your changes there
- update your standalone wrapper to use your own AudioDeviceSelectorComponent class
That’s pretty much what @benvining suggested above