jpcima / ADLplug

FM Chip Synthesizer — OPL & OPN — VST/LV2/Standalone
Boost Software License 1.0
426 stars 22 forks source link

Disable audio devices if only bulding plugins #70

Closed falkTX closed 3 years ago

falkTX commented 3 years ago

In order to minimize the amount of code in the final binary, and also to reduce the size and amount of dependencies, it would be great if the juce-audio-devices was disabled if only building plugin versions.

Currently all modules are built regardless of build config. There should be no need for alsa, jack dependencies on Linux if only building LV2/VST2, also ASIO SDK if on Windows.

jpcima commented 3 years ago

it would be great if the juce-audio-devices was disabled if only building plugin versions.

Hi, How much of a problem is this actually in practice? would not the linker take care of eliminating code which is not used?

I also would like to study a transition to Juce6 to switch to a less complicated cmake solution, which has clean selection of modules to link, but all while retaining the compatibility with my current fork.

falkTX commented 3 years ago

The build requires ASIO, only needed for standalone, so it is a problem at least there since ASIO SDK is not easy to get by (and non-free)

jpcima commented 3 years ago

OK I've added a fix for ASIO in 34e91db

falkTX commented 3 years ago

Thanks, that helps a lot!

Is it possible to ask for the same for alsa and jack? or is it too much?

jpcima commented 3 years ago

The root of this issue is that the UI requires MidiKeyboardComponent, which pulls juce_audio_utils and in turn juce_audio_devices. The problem can't be dealt with just by removing juce_audio_devices from the link.

Perhaps, I need to resort to a hacky solution where I take only the midi keyboard source off juce_audio_utils and ignore all of the rest.

falkTX commented 3 years ago

from what I see, simply removing alsa and jack as active would work, like you just did with asio.

jpcima commented 3 years ago

It's resolved at d9ccf3d

falkTX commented 3 years ago

That is great, thanks a lot!

With this set, do you mind if I add this project's binaries to https://github.com/DISTRHO/PawPaw as an lv2 plugin to install? You have binaries for macOS and windows, but no installer

jpcima commented 3 years ago

With this set, do you mind if I add this project's binaries

Sure, please do.