merge (with conflict fixes) with master (even against rgareus' recommendation)
[ardour.git] / libs / ardour / ardour / panner_manager.h
index 619beb454f5681073d8ddf67281c0684bf793c6c..73d667424f3a24f34292dcfd8a962dc35dc61d30 100644 (file)
 #ifndef __ardour_panner_manager_h__
 #define __ardour_panner_manager_h__
 
-#include <dlfcn.h>
+#include <map>
+#include <string>
+#include <glibmm/module.h>
+
 #include "ardour/panner.h"
 #include "ardour/session_handle.h"
 
 namespace ARDOUR {
 
+typedef std::map<std::string,std::string> PannerUriMap;
+
 struct LIBARDOUR_API PannerInfo {
+
        PanPluginDescriptor descriptor;
-       void* module;
+       Glib::Module* module;
 
-       PannerInfo (PanPluginDescriptor& d, void* handle)
+       PannerInfo (PanPluginDescriptor& d, Glib::Module* m)
        : descriptor (d)
-       , module (handle)
+       , module (m)
        {}
 
        ~PannerInfo () {
-               dlclose (module);
+               delete module;
        }
 };
 
@@ -50,7 +56,8 @@ public:
        std::list<PannerInfo*> panner_info;
 
        PannerInfo* select_panner (ChanCount in, ChanCount out, std::string const uri = "");
-       PannerInfo* get_by_uri (std::string uri);
+       PannerInfo* get_by_uri (std::string uri) const;
+       PannerUriMap get_available_panners(uint32_t const a_in, uint32_t const a_out) const;
 
 private:
        PannerManager();