hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.03k stars 172 forks source link

Dynamic JACK check v2 #1847

Closed theGreatWhiteShark closed 12 months ago

theGreatWhiteShark commented 12 months ago

Since libjack.so is preinstalled on all Linux OSs I checked so far, looking it up makes not a good check for JACK support. Instead, a subprocess will now attempt to call

and support is given in case any of these calls succeeded (just checking version or displaying help. Do not start anything).

Using the WANT_DYNAMIC_JACK_CHECK cmake option the dynamic check can be disabled (it will always return true - available support). Using this precausion we can draw a line between bundle build (AppImage, Flatpak) and Linux package builds. For the latter the check can only cause harm. For Windows and macOS this option is disabled as well for now. (It should be thoroughly tested first)

In case the dynamic JACK check yields the wrong results in production, we need a way to bypass it in order to not do too much harm. There are two ways now: either set the audio driver to "Jack" in the hydrogen.conf file manually or provide the "-d jack" CLI option

Addresses #1836