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