Remove some unused PostTransport enums and renumber others.
[ardour.git] / libs / ardour / panner_manager.cc
index 139101d2d95fa68184417159a95fcbd847879c70..fa500ea85ee3794221d17cc108ab42c5a624e513 100644 (file)
@@ -7,6 +7,8 @@
 #include "ardour/panner_manager.h"
 #include "ardour/panner_search_path.h"
 
+#include "i18n.h"
+
 using namespace std;
 using namespace ARDOUR;
 using namespace PBD;
@@ -19,19 +21,19 @@ PannerManager::PannerManager ()
 
 PannerManager::~PannerManager ()
 {
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                delete *p;
-        }
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               delete *p;
+       }
 }
 
 PannerManager&
 PannerManager::instance ()
 {
-        if (_instance == 0) {
-                _instance = new PannerManager ();
-        }
+       if (_instance == 0) {
+               _instance = new PannerManager ();
+       }
 
-        return *_instance;
+       return *_instance;
 }
 
 void
@@ -43,10 +45,10 @@ PannerManager::discover_panners ()
        Glib::PatternSpec dylib_extension_pattern("*.dylib");
 
        find_matching_files_in_search_path (panner_search_path (),
-                       so_extension_pattern, panner_modules);
+                                           so_extension_pattern, panner_modules);
 
        find_matching_files_in_search_path (panner_search_path (),
-                       dylib_extension_pattern, panner_modules);
+                                           dylib_extension_pattern, panner_modules);
 
        info << string_compose (_("looking for panners in %1"), panner_search_path().to_string()) << endmsg;
 
@@ -57,12 +59,12 @@ PannerManager::discover_panners ()
 int
 PannerManager::panner_discover (string path)
 {
-        PannerInfo* pinfo;
+       PannerInfo* pinfo;
 
        if ((pinfo = get_descriptor (path)) != 0) {
-                panner_info.push_back (pinfo);
-                info << string_compose(_("Panner discovered: \"%1\""), pinfo->descriptor.name) << endmsg;
-        }
+               panner_info.push_back (pinfo);
+               info << string_compose(_("Panner discovered: \"%1\""), pinfo->descriptor.name) << endmsg;
+       }
 
        return 0;
 }
@@ -71,7 +73,7 @@ PannerInfo*
 PannerManager::get_descriptor (string path)
 {
        void *module;
-        PannerInfo* info = 0;
+       PannerInfo* info = 0;
        PanPluginDescriptor *descriptor = 0;
        PanPluginDescriptor* (*dfunc)(void);
        const char *errstr;
@@ -92,7 +94,7 @@ PannerManager::get_descriptor (string path)
 
        descriptor = dfunc();
        if (descriptor) {
-                info = new PannerInfo (*descriptor, module);
+               info = new PannerInfo (*descriptor, module);
        } else {
                dlclose (module);
        }
@@ -103,51 +105,51 @@ PannerManager::get_descriptor (string path)
 PannerInfo*
 PannerManager::select_panner (ChanCount in, ChanCount out)
 {
-        PanPluginDescriptor* d;
-        int32_t nin = in.n_audio();
-        int32_t nout = out.n_audio();
-        
-        /* look for exact match first */
-
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
-
-                if (d->in == nin && d->out == nout) {
-                        return *p;
-                }
-        }
-
-        /* no exact match, look for good fit on inputs and variable on outputs */
-
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
-         
-                if (d->in == nin && d->out == -1) {
-                        return *p;
-                }
-        }
-
-        /* no exact match, look for good fit on outputs and variable on inputs */
-
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
-         
-                if (d->in == -1 && d->out == nout) {
-                        return *p;
-                }
-        }
-
-        /* no exact match, look for variable fit on inputs and outputs */
-
-        for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
-                d = &(*p)->descriptor;
-         
-                if (d->in == -1 && d->out == -1) {
-                        return *p;
-                }
-        }
-
-        warning << string_compose (_("no panner discovered for in/out = %1/%2"), nin, nout) << endmsg;
-
-        return 0;
+       PanPluginDescriptor* d;
+       int32_t nin = in.n_audio();
+       int32_t nout = out.n_audio();
+
+       /* look for exact match first */
+
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
+
+               if (d->in == nin && d->out == nout) {
+                       return *p;
+               }
+       }
+
+       /* no exact match, look for good fit on inputs and variable on outputs */
+
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
+
+               if (d->in == nin && d->out == -1) {
+                       return *p;
+               }
+       }
+
+       /* no exact match, look for good fit on outputs and variable on inputs */
+
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
+
+               if (d->in == -1 && d->out == nout) {
+                       return *p;
+               }
+       }
+
+       /* no exact match, look for variable fit on inputs and outputs */
+
+       for (list<PannerInfo*>::iterator p = panner_info.begin(); p != panner_info.end(); ++p) {
+               d = &(*p)->descriptor;
+
+               if (d->in == -1 && d->out == -1) {
+                       return *p;
+               }
+       }
+
+       warning << string_compose (_("no panner discovered for in/out = %1/%2"), nin, nout) << endmsg;
+
+       return 0;
 }