Skip to content

Commit

Permalink
jackbridge: only use dlmopen for pipewire
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Feb 9, 2024
1 parent b38b1e8 commit 75fbd0c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions patches/portaudio19/04_jackbridge-mod-desktop.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ new file mode 100644
index 0000000..facfb53
--- /dev/null
+++ b/src/hostapi/jack/JackBridge.c
@@ -0,0 +1,1822 @@
@@ -0,0 +1,1826 @@
+/*
+ * JackBridge for DPF
+ * Copyright (C) 2013-2022 Filipe Coelho <falktx@falktx.com>
Expand Down Expand Up @@ -325,17 +325,21 @@ index 0000000..facfb53
+#if !(defined(JACKBRIDGE_DUMMY) || defined(JACKBRIDGE_DIRECT))
+ #if defined(__APPLE__)
+ const char* const filename = "libjack.dylib";
+ void* const lib = dlopen(filename, RTLD_NOW|RTLD_LOCAL);
+ #elif defined(_WIN64)
+ const char* const filename = "libjack64.dll";
+ void* const lib = LoadLibraryA(filename);
+ #elif defined(_WIN32)
+ const char* const filename = "libjack.dll";
+ void* const lib = LoadLibraryA(filename);
+ #else
+ const char* const filenameEnv = getenv("JACKBRIDGE_FILENAME");
+ const char* const filename = filenameEnv != NULL ? filenameEnv : "libjack.so.0";
+ void* const lib = filenameEnv != NULL
+ ? dlmopen(LM_ID_NEWLM, filename, RTLD_NOW|RTLD_LOCAL)
+ : dlopen(filename, RTLD_NOW|RTLD_LOCAL);
+ #endif
+
+ void* const lib = dlmopen(LM_ID_NEWLM, filename, RTLD_NOW|RTLD_LOCAL);
+
+ if (lib == NULL)
+ {
+ fprintf(stderr, "Failed to load JACK DLL, reason:\n%s\n", dlerror());
Expand Down

0 comments on commit 75fbd0c

Please sign in to comment.