Browse Source

jackbridge: only use dlmopen for pipewire

Signed-off-by: falkTX <falktx@falktx.com>
test-github-breakage
falkTX 1 year ago
parent
commit
75fbd0c4e8
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      patches/portaudio19/04_jackbridge-mod-desktop.patch

+ 7
- 3
patches/portaudio19/04_jackbridge-mod-desktop.patch View File

@@ -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>
@@ -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());


Loading…
Cancel
Save