fix #4405, by explicitly cancelling solo when a route's inputs drop to zero
[ardour.git] / libs / ardour / panner_manager.cc
index 7203f57cba903be478746166475f361f2016357f..cf148f08faf61549216c8446acb63940873e278c 100644 (file)
 #include <unistd.h>
 
 #include <glibmm/pattern.h>
+#include <glibmm/fileutils.h>
 
 #include "pbd/error.h"
 #include "pbd/compose.h"
 #include "pbd/file_utils.h"
-#include "pbd/symlink.h"
 
 #include "ardour/panner_manager.h"
 #include "ardour/panner_search_path.h"
@@ -63,11 +63,7 @@ PannerManager::discover_panners ()
 {
        vector<sys::path> panner_modules;
 
-       /* We reject symlinked panner .so files below, so we must find the unlinked
-          (versioned) names here.
-       */
-       Glib::PatternSpec so_extension_pattern("*.so*");
-       
+       Glib::PatternSpec so_extension_pattern("*.so");
        Glib::PatternSpec dylib_extension_pattern("*.dylib");
 
        find_matching_files_in_search_path (panner_search_path (),
@@ -87,17 +83,20 @@ PannerManager::panner_discover (string path)
 {
        PannerInfo* pinfo;
 
-       /* don't look in symlinks, because otherwise we find too many versions
-        * of the same library.
-        */
+       if ((pinfo = get_descriptor (path)) != 0) {
 
-       if (PBD::is_symlink (path)) {
-               return 0;
-       }
+               list<PannerInfo*>::iterator i;
 
-       if ((pinfo = get_descriptor (path)) != 0) {
-               panner_info.push_back (pinfo);
-               info << string_compose(_("Panner discovered: \"%1\" in %2"), pinfo->descriptor.name, path) << endmsg;
+               for (i = panner_info.begin(); i != panner_info.end(); ++i) {
+                       if (pinfo->descriptor.name == (*i)->descriptor.name) {
+                               break;
+                       }
+               }
+
+               if (i == panner_info.end()) {
+                       panner_info.push_back (pinfo);
+                       info << string_compose(_("Panner discovered: \"%1\" in %2"), pinfo->descriptor.name, path) << endmsg;
+               }
        }
 
        return 0;