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

Jack audio support on windows #2136

Closed
swellbastion opened this issue Jun 27, 2015 · 2 comments · Fixed by #5716
Closed

Jack audio support on windows #2136

swellbastion opened this issue Jun 27, 2015 · 2 comments · Fixed by #5716

Comments

@swellbastion
Copy link

I don't know if this is the proper place for a feature request like this, but eventually it would be cool to have jack support on windows. There are obviously much more pressing things to work on though.

@tresf
Copy link
Member

tresf commented Oct 16, 2020

Disclaimer: I'm not a Jack user, so I'll need some help from actual Jack users that feels comfortable enough using it on Windows to test/explain how functional this is. Here's a download link until the PR becomes available.

Jack's own website seems to be quite dated, the instructions reference -- what appear to be an older version of Jack -- asking users to call commands like regsvr32 as post-install steps for .dll. I didn't do any of these steps and I'm fairly comfortable starting that they're not needed. I did need to start the jack server using a modified version of the ASIO command. To that point, on Windows 10 I couldn't find any of the start menu items the article referenced, so expect to hunt around in Program Files trying to get things working. Chances are Linux JACK users will already know what they're looking for.

Building Jack support into Windows hypothetically requires two steps: 1. Enabling it in CMake 2. Instructing mingw (or MSVC) to find the header.

  • Assuming we target mingw, typically, we'd leverage an mingw32 build of Jack however one doesn't exist. That's OK.
  • Fortunately thanks to weak-linking using the https://github.com/x42/weakjack project, we don't need to actually link against any libraries at build time.
  • That said, since mingw is missing jack/jack.h as well, we need to copy the Linux version over until we have a better way to include it safely. Here's how I did that:
Show code
cp -R /usr/include/jack/ ~/lmms/build
 diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3c83c1a4..411f7bad8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,6 @@ ENDIF(LMMS_BUILD_APPLE)

IF(LMMS_BUILD_WIN32)
        SET(WANT_ALSA OFF)
-       SET(WANT_JACK OFF)
        SET(WANT_PULSEAUDIO OFF)
        SET(WANT_SNDIO OFF)
        SET(WANT_SOUNDIO OFF)
@@ -105,7 +104,6 @@ IF(LMMS_BUILD_WIN32)
        SET(BUNDLE_QT_TRANSLATIONS ON)
        SET(LMMS_HAVE_WINMM TRUE)
        SET(STATUS_ALSA "<not supported on this platform>")
-       SET(STATUS_JACK "<not supported on this platform>")
        SET(STATUS_PULSEAUDIO "<not supported on this platform>")
        SET(STATUS_SOUNDIO "<disabled in this release>")
        SET(STATUS_WINMM "OK")
@@ -433,8 +431,10 @@ ENDIF(NOT LMMS_HAVE_ALSA)

# check for JACK
IF(WANT_JACK)
-       PKG_CHECK_MODULES(JACK jack>=0.77)
-       IF(JACK_FOUND)
+       
+       # PKG_CHECK_MODULES(JACK jack>=0.77)
+       IF(TRUE)
+               INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
                IF(WANT_WEAKJACK)
                        SET(LMMS_HAVE_WEAKJACK TRUE)
                        SET(WEAKJACK_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/3rdparty/weakjack/weakjack)

A more permanent approach is to use the jack source code as a submodule. An example of a very similar technique (using a weak linked version of Carla) can be found here.

Here's Jack working on Windows. Any testing using the download link above is greatly appreciated.

image

Pining @falkTX since he asked about this in #4654.

@tresf
Copy link
Member

tresf commented Oct 30, 2020

Done via #5716. Any builds from master here forward will have JACK support built-in.

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

Successfully merging a pull request may close this issue.

3 participants