Skip to content

Commit

Permalink
More tweaks to jack2 MOD build, jackbridge for portaudio
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 28, 2023
1 parent 5751faa commit aba5248
Show file tree
Hide file tree
Showing 4 changed files with 2,744 additions and 11 deletions.
11 changes: 9 additions & 2 deletions bootstrap-jack2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,21 @@ if [ "${LINUX}" -eq 1 ] || [ "${WIN32}" -eq 1 ]; then

if [ "${LINUX}" -eq 1 ]; then
PORTAUDIO_EXTRAFLAGS+=" --with-alsa"
elif [ "${WIN32}" -eq 1 ]; then
PORTAUDIO_EXTRAFLAGS+=" --with-jack"
else
PORTAUDIO_EXTRAFLAGS+=" --without-alsa"
PORTAUDIO_EXTRAFLAGS+=" --without-jack"
fi

if [ "${WIN32}" -eq 1 ]; then
export EXTRA_CFLAGS="-I${ASIO_DIR}"
export EXTRA_CXXFLAGS="-I${ASIO_DIR}"
export EXTRA_MAKE_ARGS="-j 1"
PORTAUDIO_EXTRAFLAGS+=" --with-asiodir=${ASIO_DIR}"
PORTAUDIO_EXTRAFLAGS+=" --with-winapi=asio,directx,wasapi,wdmks,wmme"
fi

export EXTRA_MAKE_ARGS="-j 1"

download portaudio19 "${PORTAUDIO_VERSION}" "${PORTAUDIO_URL}" "orig.tar.gz"
remove_file portaudio19 "${PORTAUDIO_VERSION}" "src/hostapi/wasapi/mingw-include/audioclient.h"
remove_file portaudio19 "${PORTAUDIO_VERSION}" "src/hostapi/wasapi/mingw-include/devicetopology.h"
Expand Down
16 changes: 7 additions & 9 deletions bootstrap-mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ JACK2_URL="https://github.com/jackaudio/jack2.git"
JACK2_EXTRAFLAGS=""
JACK2_EXTRAFLAGS+=" --autostart=none"
JACK2_EXTRAFLAGS+=" --classic"
JACK2_EXTRAFLAGS+=" --db=yes"
JACK2_EXTRAFLAGS+=" --db=no"
JACK2_EXTRAFLAGS+=" --doxygen=no"
JACK2_EXTRAFLAGS+=" --firewire=no"
JACK2_EXTRAFLAGS+=" --iio=no"
Expand All @@ -190,14 +190,12 @@ JACK2_EXTRAFLAGS+=" --opus=no"
JACK2_EXTRAFLAGS+=" --samplerate=no"
JACK2_EXTRAFLAGS+=" --systemd=no"

if [ "${CROSS_COMPILING}" -eq 1 ]; then
if [ "${LINUX}" -eq 1 ]; then
JACK2_EXTRAFLAGS+=" --platform=linux --portaudio=yes --alsa=yes"
elif [ "${MACOS}" -eq 1 ]; then
JACK2_EXTRAFLAGS+=" --platform=darwin"
elif [ "${WIN32}" -eq 1 ]; then
JACK2_EXTRAFLAGS+=" --platform=win32"
fi
if [ "${LINUX}" -eq 1 ]; then
JACK2_EXTRAFLAGS+=" --platform=linux --portaudio=yes --alsa=yes"
elif [ "${MACOS}" -eq 1 ]; then
JACK2_EXTRAFLAGS+=" --platform=darwin"
elif [ "${WIN32}" -eq 1 ]; then
JACK2_EXTRAFLAGS+=" --platform=win32"
fi

if [ "${WIN32}" -eq 1 ]; then
Expand Down
15 changes: 15 additions & 0 deletions patches/jack2/03_skip-alsa-plugins-client.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/common/JackInternalClient.cpp b/common/JackInternalClient.cpp
index 6b4dd75..a428c97 100644
--- a/common/JackInternalClient.cpp
+++ b/common/JackInternalClient.cpp
@@ -73,6 +73,10 @@ int JackInternalClient::Open(const char* server_name, const char* name, jack_uui
int result;
jack_log("JackInternalClient::Open name = %s", name);

+ // ignore client from alsa-plugins
+ if (strncmp(name, "alsa-jack.", 10) == 0)
+ return -1;
+
if (strlen(name) >= JACK_CLIENT_NAME_SIZE) {
jack_error("\"%s\" is too long to be used as a JACK client name.\n"
"Please use %lu characters or less",
Loading

0 comments on commit aba5248

Please sign in to comment.