X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fpanner.cc;h=c70c8ea790354b55f9faa2197a63bf0a38a2103e;hb=de4c0eb27c84a48828e276fc702e139d25eeba72;hp=05676c107dec0d0bfd82820276fda65ed3520bb2;hpb=5625f41c8674c72ffdc78343c384cb8c3f938996;p=ardour.git diff --git a/libs/ardour/panner.cc b/libs/ardour/panner.cc index 05676c107d..c70c8ea790 100644 --- a/libs/ardour/panner.cc +++ b/libs/ardour/panner.cc @@ -17,59 +17,32 @@ */ -#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" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; Panner::Panner (boost::shared_ptr 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 @@ -84,7 +57,7 @@ Panner::distribute (BufferSet& ibufs, BufferSet& obufs, gain_t gain_coeff, pfram void Panner::distribute_automated (BufferSet& ibufs, BufferSet& obufs, - framepos_t start, framepos_t end, pframes_t nframes, pan_t** buffers) + samplepos_t start, samplepos_t end, pframes_t nframes, pan_t** buffers) { uint32_t which = 0; @@ -93,12 +66,6 @@ Panner::distribute_automated (BufferSet& ibufs, BufferSet& obufs, } } -void -Panner::set_automation_style (AutoStyle style) -{ - _pannable->set_automation_style (style); -} - void Panner::set_automation_state (AutoState state) { @@ -111,12 +78,6 @@ Panner::automation_state () const return _pannable->automation_state(); } -AutoStyle -Panner::automation_style () const -{ - return _pannable->automation_style (); -} - bool Panner::touching () const { @@ -136,7 +97,27 @@ Panner::describe_parameter (Evoral::Parameter p) } string -Panner::value_as_string (boost::shared_ptr ac) const +Panner::value_as_string (boost::shared_ptr 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--; + } +}