fix plugin silence runs (e.g. during audition)
[ardour.git] / libs / ardour / panner.cc
index 05676c107dec0d0bfd82820276fda65ed3520bb2..c88fbe44f430e1a9f679dfcc84365d611e4e1417 100644 (file)
 
 */
 
-#include "ardour/audio_buffer.h"
 #include "ardour/buffer_set.h"
 #include "ardour/debug.h"
 #include "ardour/panner.h"
 #include "ardour/pannable.h"
-#include "ardour/session.h"
-#include "ardour/utils.h"
 
 #include "i18n.h"
 
@@ -31,45 +28,21 @@ using namespace std;
 using namespace ARDOUR;
 
 Panner::Panner (boost::shared_ptr<Pannable> p)
-       : _pannable (p)
-       , _bypassed (false)
+       : _frozen (0)
 {
+       // boost_debug_shared_ptr_mark_interesting (this, "panner");
+       _pannable = p;
 }
 
 Panner::~Panner ()
 {
-       DEBUG_TRACE(PBD::DEBUG::Destruction, string_compose ("panner @ %1 destructor, pannable is %2\n", this, _pannable));
-}
-
-void
-Panner::set_bypassed (bool yn)
-{
-       if (yn != _bypassed) {
-               _bypassed = yn;
-               StateChanged ();
-       }
-}
-
-int
-Panner::set_state (const XMLNode& node, int version)
-{
-       const XMLProperty* prop;
-
-       if ((prop = node.property (X_("bypassed"))) != 0) {
-               set_bypassed (string_is_affirmative (prop->value()));
-       }
-
-       return 0;
+       DEBUG_TRACE(PBD::DEBUG::Destruction, string_compose ("panner @ %1 destructor, pannable is %2 @ %3\n", this, _pannable, &_pannable));
 }
 
 XMLNode&
 Panner::get_state ()
 {
-       XMLNode* node = new XMLNode (X_("Panner"));
-
-       node->add_property (X_("bypassed"), (bypassed() ? "yes" : "no"));
-
-       return *node;
+       return *(new XMLNode (X_("Panner")));
 }
 
 void
@@ -140,3 +113,23 @@ Panner::value_as_string (boost::shared_ptr<AutomationControl> ac) const
 {
        return _pannable->value_as_string (ac);
 }
+
+int
+Panner::set_state (XMLNode const &, int)
+{
+       return 0;
+}
+
+void
+Panner::freeze ()
+{
+       _frozen++;
+}
+
+void
+Panner::thaw ()
+{
+       if (_frozen > 0.0) {
+               _frozen--;
+       }
+}