diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-28 18:31:18 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-11-28 18:31:18 +0000 |
commit | 9b7a35cdc0d63d05d91f9deba294bcb7113a9106 (patch) | |
tree | 566657c72ba088461bdcd858402a01fab2738090 /libs/ardour/ardour/panner.h | |
parent | 422309880c0448d95c7be2cec43384b604fa427c (diff) |
more or less complete restoration of Controllable::_id from XML, with all that implies for MIDI bindings continuing to work across session reloads, and also that the controlled parameter is now set from Controllable::set_value() during session loading, not directly from its "own" XML value; still some funny stuff going on with Panners. This may have broken 2.X session loading in that panners may not be setup correctly
git-svn-id: svn://localhost/ardour2/branches/3.0@8117 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/panner.h')
-rw-r--r-- | libs/ardour/ardour/panner.h | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/libs/ardour/ardour/panner.h b/libs/ardour/ardour/panner.h index 5a4c008c5f..a4b49a9a72 100644 --- a/libs/ardour/ardour/panner.h +++ b/libs/ardour/ardour/panner.h @@ -87,6 +87,20 @@ class StreamPanner : public PBD::Stateful /* old school automation loading */ virtual int load (std::istream&, std::string path, uint32_t&) = 0; + struct PanControllable : public AutomationControl { + PanControllable (Session& s, std::string name, StreamPanner& p, Evoral::Parameter param) + : AutomationControl (s, param, + boost::shared_ptr<AutomationList>(new AutomationList(param)), name) + , streampanner (p) + { assert(param.type() != NullAutomation); } + + AutomationList* alist() { return (AutomationList*)_list.get(); } + StreamPanner& streampanner; + + void set_value (double); + double get_value (void) const; + }; + protected: friend class Panner; Panner& parent; @@ -99,10 +113,10 @@ class StreamPanner : public PBD::Stateful bool _muted; bool _mono; - + boost::shared_ptr<AutomationControl> _control; - void add_state (XMLNode&); + XMLNode& get_state (); /* Update internal parameters based on this.angles */ virtual void update () = 0; @@ -257,30 +271,16 @@ public: int load (); - struct PanControllable : public AutomationControl { - PanControllable (Session& s, std::string name, Panner& p, Evoral::Parameter param) - : AutomationControl (s, param, - boost::shared_ptr<AutomationList>(new AutomationList(param)), name) - , panner (p) - { assert(param.type() != NullAutomation); } - - AutomationList* alist() { return (AutomationList*)_list.get(); } - Panner& panner; - - void set_value (double); - double get_value (void) const; - }; - - boost::shared_ptr<AutomationControl> pan_control (int id, int chan=0) { + boost::shared_ptr<AutomationControl> pan_control (int id, uint32_t chan=0) { return automation_control (Evoral::Parameter (PanAutomation, chan, id)); } - boost::shared_ptr<const AutomationControl> pan_control (int id, int chan=0) const { + boost::shared_ptr<const AutomationControl> pan_control (int id, uint32_t chan=0) const { return automation_control (Evoral::Parameter (PanAutomation, chan, id)); } static std::string value_as_string (double); - + private: /* disallow copy construction */ Panner (Panner const &); |