JUCE
JUCE copied to clipboard
[Bug]: StandaloneFilterWindow doesn't reference "Plugin MIDI Input" jucer option when creating AudioDeviceSelectorComponent
Detailed steps on how to reproduce the bug
On line 523 of juce_StandaloneFilterWindow.h, SettingsComponent passes true as the argument to the parameter bool showMidiInputOptions of the AudioDeviceSelectorComponent.
This means that audio settings windows will display MIDI input options, despite them not being enabled in projucer.
This is in stark contrast to the bool showMidiOutputSelector, which does reference the projcer-defined options.
Here is the entire constructor call (lines 4 and 5 are the midi input and output, respectively):
deviceSelector (deviceManagerToUse,
0, maxAudioInputChannels,
0, maxAudioOutputChannels,
true,
(pluginHolder.processor.get() != nullptr && pluginHolder.processor->producesMidi()),
true, false),
Solution:
Refactor line 4 above to be something like:
pluginHolder.processor.get() != nullptr && pluginHolder.processor->acceptsMidi(),
What is the expected behaviour?
The audio settings window will not draw a MIDI input component when "Plugin MIDI input" is not enabled in projucer.
Operating systems
Windows
What versions of the operating systems?
Win 11
Architectures
64-bit
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
- [X] I agree to follow the Code of Conduct
Note: I tested the alternate parameter on my machine (Win 11x64) and it built just fine. May submit a pull request with the change. Open to feedback.
edit: One issue with my simple fix is that the settings window doesn't shrink to remove the freed space. Can't figure out why, as the constructor fully fleshes-out both cases for showMidiInputOptions, so it should be good.