atsushieno / aap-juce

AAP (Audio Plugins For Android) JUCE integration.
GNU General Public License v3.0
15 stars 1 forks source link

JUCE issue: JUCE apps opens MIDI devices at startup #38

Open atsushieno opened 1 year ago

atsushieno commented 1 year ago

It is super annoying, but when we launch aap-juce-simple-host and aap-juce-plugin-host, it tries to access ALL midi devices including MidiDeviceServices and actually opens some MIDI devices. It does not make sense. It tries to open my fluidsynth-midi-service-j which is MIDI OUTPUT device. It happens due to the infamous JUCE on Android bug that it mis-recognizes MIDI output devices as MIDI input devices.

That feature should be completely scrapped within JUCE itself. Therefore we will need another patch to fix it.

The same goes for JUCE plugins because we use Standalone apps, but fortunately there is #if JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE conditional check in the JUCE sources, so we could individually apply that. We already disabled that auto open garbage in projuce-app.sh so projucer-based apps won't open it. We still have to apply this individually in CMake based projects though.

atsushieno commented 1 year ago

Looks like host side is not as horrible as plugin Standalone apps. It does call openDevice(), but does not open ports.

Once we fix all existing CMake plugin ports by adding JUCE_DONT_AUTO_OPEN_MIDI_DEVICES_ON_MOBILE=1 (and confirming that fix by projuce-app.sh works), we can close this issue.