Add a couple of visibility specifiers that were missing
[ardour.git] / libs / panners / 1in2out / panner_1in2out.cc
index 19b8dadd6de75ecfd264dbf1c22ae75c0211e4d5..2d5489f0ce9378700a283de3f11ae8c6ef3d2805 100644 (file)
@@ -63,11 +63,14 @@ using namespace PBD;
 
 static PanPluginDescriptor _descriptor = {
         "Mono to Stereo Panner",
+        "http://ardour.org/plugin/panner_1in2out",
+        "http://ardour.org/plugin/panner_1in2out#ui",
         1, 2, 
+        10000,
         Panner1in2out::factory
 };
 
-extern "C" { PanPluginDescriptor* panner_descriptor () { return &_descriptor; } }
+extern "C" ARDOURPANNER_API PanPluginDescriptor*  panner_descriptor () { return &_descriptor; }
 
 Panner1in2out::Panner1in2out (boost::shared_ptr<Pannable> p)
        : Panner (p)
@@ -121,6 +124,12 @@ Panner1in2out::clamp_position (double& p)
         return true;
 }
 
+pair<double, double>
+Panner1in2out::position_range () const
+{
+       return make_pair (0, 1);
+}
+
 double 
 Panner1in2out::position () const
 {
@@ -326,6 +335,8 @@ XMLNode&
 Panner1in2out::get_state ()
 {
        XMLNode& root (Panner::get_state ());
+       root.add_property (X_("uri"), _descriptor.panner_uri);
+       /* this is needed to allow new sessions to load with old Ardour: */
        root.add_property (X_("type"), _descriptor.name);
        return root;
 }
@@ -364,12 +375,23 @@ Panner1in2out::value_as_string (boost::shared_ptr<AutomationControl> ac) const
                    
                    This is pretty wierd, but its the way audio engineers expect it. Just remember that
                    the center of the USA isn't Kansas, its (50LA, 50NY) and it will all make sense.
+
+                  This is designed to be as narrow as possible. Dedicated
+                  panner GUIs can do their own version of this if they need
+                  something less compact.
                 */
                 
-                return string_compose (_("L:%1 R:%2"), (int) rint (100.0 * (1.0 - val)),
+                return string_compose (_("L%1R%2"), (int) rint (100.0 * (1.0 - val)),
                                        (int) rint (100.0 * val));
                 
         default:
-                return _pannable->value_as_string (ac);
+                return _("unused");
         }
 }
+
+void
+Panner1in2out::reset ()
+{
+       set_position (0.5);
+       update ();
+}