Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: StandaloneFilterWindow doesn't reference "Plugin MIDI Input" jucer option when creating AudioDeviceSelectorComponent #1257

Open
1 task done
kriskeillor opened this issue Aug 13, 2023 · 1 comment

Comments

@kriskeillor
Copy link

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

  • I agree to follow the Code of Conduct
@kriskeillor
Copy link
Author

kriskeillor commented Aug 13, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant