diff options
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/amp.h | 25 | ||||
-rw-r--r-- | libs/ardour/ardour/return.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/send.h | 1 |
4 files changed, 11 insertions, 18 deletions
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index c92edcc5fc..108694de90 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -36,13 +36,11 @@ class IO; */ class LIBARDOUR_API Amp : public Processor { public: - Amp(Session& s, std::string type = "amp"); + Amp(Session& s, const std::string& display_name, boost::shared_ptr<AutomationControl> control, bool control_midi_also); std::string display_name () const { return _display_name; } void set_display_name (const std::string& name) { _display_name = name; } - std::string type() const { return _type;} - bool visible () const; bool can_support_io_configuration (const ChanCount& in, ChanCount& out); @@ -81,16 +79,8 @@ public: /* automation */ struct GainControl : public AutomationControl { - GainControl (std::string name, Session& session, Amp* a, const Evoral::Parameter ¶m, - boost::shared_ptr<AutomationList> al = boost::shared_ptr<AutomationList>() ) - : AutomationControl (session, param, ParameterDescriptor(param), al, name) - , _amp (a) { - set_flags (Controllable::Flag (flags() | Controllable::GainLike)); - alist()->reset_default (1.0); - - lower_db = accurate_coefficient_to_dB (_desc.lower); - range_db = accurate_coefficient_to_dB (_desc.upper) - lower_db; - } + GainControl (Session& session, const Evoral::Parameter ¶m, + boost::shared_ptr<AutomationList> al = boost::shared_ptr<AutomationList>()); void set_value (double val, PBD::Controllable::GroupControlDisposition group_override); void set_value_unchecked (double); @@ -101,17 +91,17 @@ public: double user_to_internal (double) const; std::string get_user_string () const; - Amp* _amp; double lower_db; double range_db; }; + boost::shared_ptr<GainControl> gain_control() { - return _gain_control; + return boost::dynamic_pointer_cast<GainControl> (_gain_control); } boost::shared_ptr<const GainControl> gain_control() const { - return _gain_control; + return boost::dynamic_pointer_cast<GainControl> (_gain_control); } std::string value_as_string (boost::shared_ptr<AutomationControl>) const; @@ -125,11 +115,10 @@ private: std::string _display_name; - boost::shared_ptr<GainControl> _gain_control; + boost::shared_ptr<AutomationControl> _gain_control; /** Buffer that we should use for gain automation */ gain_t* _gain_automation_buffer; - std::string _type; bool _midi_amp; }; diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 45bb5573b2..e2e326d7d0 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -64,6 +64,7 @@ public: protected: bool _metering; + boost::shared_ptr<AutomationControl> _gain_control; boost::shared_ptr<Amp> _amp; boost::shared_ptr<PeakMeter> _meter; diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index 2086f32119..9a0cf9ee0b 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -675,7 +675,9 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou virtual void maybe_declick (BufferSet&, framecnt_t, int); + boost::shared_ptr<AutomationControl> _gain_control; boost::shared_ptr<Amp> _amp; + boost::shared_ptr<AutomationControl> _trim_control; boost::shared_ptr<Amp> _trim; boost::shared_ptr<PeakMeter> _meter; boost::shared_ptr<DelayLine> _delayline; diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index f944dcabfb..5db0b94b87 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -78,6 +78,7 @@ class LIBARDOUR_API Send : public Delivery protected: bool _metering; + boost::shared_ptr<AutomationControl> _gain_control; boost::shared_ptr<Amp> _amp; boost::shared_ptr<PeakMeter> _meter; boost::shared_ptr<DelayLine> _delayline; |