[Bf-blender-cvs] [538b302] master: Audapsace: Make it work with Jack and no libjack-dev package installed

Sergey Sharybin noreply at git.blender.org
Mon Aug 1 20:40:41 CEST 2016


Commit: 538b30250d6460c8ca27c25a58fead425131d7a9
Author: Sergey Sharybin
Date:   Mon Aug 1 20:39:54 2016 +0200
Branches: master
https://developer.blender.org/rB538b30250d6460c8ca27c25a58fead425131d7a9

Audapsace: Make it work with Jack and no libjack-dev package installed

@neXyon, mind backporting it to your upstream? :)

===================================================================

M	intern/audaspace/jack/AUD_JackLibrary.cpp

===================================================================

diff --git a/intern/audaspace/jack/AUD_JackLibrary.cpp b/intern/audaspace/jack/AUD_JackLibrary.cpp
index 63306ee..9ed6862 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;




More information about the Bf-blender-cvs mailing list