mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
juce_audio_devices: Add support for JACK on Windows and macOS
This commit is contained in:
parent
b7d0364e69
commit
f608e7cce2
4 changed files with 36 additions and 15 deletions
|
|
@ -42,7 +42,11 @@ static void* juce_loadJackFunction (const char* const name)
|
|||
if (juce_libjackHandle == nullptr)
|
||||
return nullptr;
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
return GetProcAddress ((HMODULE) juce_libjackHandle, name);
|
||||
#else
|
||||
return dlsym (juce_libjackHandle, name);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define JUCE_DECL_JACK_FUNCTION(return_type, fn_name, argument_types, arguments) \
|
||||
|
|
@ -604,8 +608,19 @@ public:
|
|||
inputNames.clear();
|
||||
outputNames.clear();
|
||||
|
||||
#if (JUCE_LINUX || JUCE_BSD)
|
||||
if (juce_libjackHandle == nullptr) juce_libjackHandle = dlopen ("libjack.so.0", RTLD_LAZY);
|
||||
if (juce_libjackHandle == nullptr) juce_libjackHandle = dlopen ("libjack.so", RTLD_LAZY);
|
||||
#elif JUCE_MAC
|
||||
if (juce_libjackHandle == nullptr) juce_libjackHandle = dlopen ("libjack.dylib", RTLD_LAZY);
|
||||
#elif JUCE_WINDOWS
|
||||
#if JUCE_64BIT
|
||||
if (juce_libjackHandle == nullptr) juce_libjackHandle = LoadLibraryA ("libjack64.dll");
|
||||
#else
|
||||
if (juce_libjackHandle == nullptr) juce_libjackHandle = LoadLibraryA ("libjack.dll");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (juce_libjackHandle == nullptr) return;
|
||||
|
||||
jack_status_t status = {};
|
||||
Loading…
Add table
Add a link
Reference in a new issue