Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-08-01 21:39:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-08-01 21:39:54 +0300
commit538b30250d6460c8ca27c25a58fead425131d7a9 (patch)
treea4138c5601bd3af2750d3ef9c4768c61e3057cbc /intern/audaspace
parent8e015e30b5a9c69acab0c6c8e6bab136c1eb11fd (diff)
Audapsace: Make it work with Jack and no libjack-dev package installed
@neXyon, mind backporting it to your upstream? :)
Diffstat (limited to 'intern/audaspace')
-rw-r--r--intern/audaspace/jack/AUD_JackLibrary.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/intern/audaspace/jack/AUD_JackLibrary.cpp b/intern/audaspace/jack/AUD_JackLibrary.cpp
index 63306ee0b15..9ed6862bbb9 100644
--- a/intern/audaspace/jack/AUD_JackLibrary.cpp
+++ b/intern/audaspace/jack/AUD_JackLibrary.cpp
@@ -44,7 +44,20 @@ static bool jack_supported = false;
void AUD_jack_init(void)
{
#ifdef WITH_JACK_DYNLOAD
- jack_handle = dlopen("libjack.so", RTLD_LAZY);
+ const char *names[] = {"libjack.so",
+ "libjack.so.0",
+ "libjack.so.1",
+ "libjack.so.2",
+ NULL};
+ int index = 0;
+ while (names[index] != NULL) {
+ jack_handle = dlopen(names[index], RTLD_LAZY);
+ if (jack_handle != NULL) {
+ // Found existing library.
+ break;
+ }
+ ++index;
+ }
if (!jack_handle) {
return;