diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-27 16:11:47 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:45 -0400 |
commit | 2ac7108ccbcf873128fef7977edfdcd90d243104 (patch) | |
tree | 8e2e006a8ea80c594fd4741ba8f8d463b216e52e /libs/ardour/ardour | |
parent | 203cf3ce7c3b6130a58626082d051ade8ca90dbf (diff) |
use new record safe control in libardour
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/stripable.h | 4 | ||||
-rw-r--r-- | libs/ardour/ardour/track.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/utils.h | 14 | ||||
-rw-r--r-- | libs/ardour/ardour/vca.h | 75 |
4 files changed, 43 insertions, 52 deletions
diff --git a/libs/ardour/ardour/stripable.h b/libs/ardour/ardour/stripable.h index 0ebd1f55ad..b21b98f2bb 100644 --- a/libs/ardour/ardour/stripable.h +++ b/libs/ardour/ardour/stripable.h @@ -44,6 +44,8 @@ class SoloIsolateControl; class SoloSafeControl; class MonitorControl; class MonitorProcessor; +class RecordEnableControl; +class RecordSafeControl; /* This is a virtual base class for any object that needs to be potentially * represented by a control-centric user interface using the general model of a @@ -104,7 +106,9 @@ class LIBARDOUR_API Stripable : public SessionObject { virtual boost::shared_ptr<GainControl> trim_control() const = 0; virtual boost::shared_ptr<MonitorControl> monitoring_control() const = 0; + virtual boost::shared_ptr<AutomationControl> rec_enable_control() const { return boost::shared_ptr<AutomationControl>(); } + virtual boost::shared_ptr<AutomationControl> rec_safe_control() const { return boost::shared_ptr<AutomationControl>(); } /* "well-known" controls for panning. Any or all of these may return * null. diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h index d57e0a2b5a..243d40faf0 100644 --- a/libs/ardour/ardour/track.h +++ b/libs/ardour/ardour/track.h @@ -36,6 +36,8 @@ class Region; class Diskstream; class IO; class MonitorControl; +class RecordEnableControl; +class RecordSafeControl; /** A track is an route (bus) with a recordable diskstream and * related objects relevant to tracking, playback and editing. diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index 1dc7c2baf4..4edf9fb446 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -176,7 +176,7 @@ LIBARDOUR_API bool matching_unsuffixed_filename_exists_in (const std::string& di LIBARDOUR_API uint32_t how_many_dsp_threads (); -template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list (boost::shared_ptr<RouteList> rl, boost::shared_ptr<T> (Route::*get_control)() const) { +template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list (boost::shared_ptr<RouteList> rl, boost::shared_ptr<T> (Stripable::*get_control)() const) { boost::shared_ptr<ControlList> cl (new ControlList); for (RouteList::const_iterator r = rl->begin(); r != rl->end(); ++r) { boost::shared_ptr<AutomationControl> ac = ((*r).get()->*get_control)(); @@ -187,18 +187,6 @@ template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list ( return cl; } -template<typename T> boost::shared_ptr<ControlList> route_list_to_control_list (boost::shared_ptr<RouteList> rl, boost::shared_ptr<T> (Track::*get_control)() const) { - boost::shared_ptr<ControlList> cl (new ControlList); - for (RouteList::const_iterator r = rl->begin(); r != rl->end(); ++r) { - boost::shared_ptr<Track> t = boost::dynamic_pointer_cast<Track> (*r); - boost::shared_ptr<AutomationControl> ac = (t.get()->*get_control)(); - if (ac) { - cl->push_back (ac); - } - } - return cl; -} - #if __APPLE__ LIBARDOUR_API std::string CFStringRefToStdString(CFStringRef stringRef); #endif // __APPLE__ diff --git a/libs/ardour/ardour/vca.h b/libs/ardour/ardour/vca.h index 1583e453fc..de0117ae8c 100644 --- a/libs/ardour/ardour/vca.h +++ b/libs/ardour/ardour/vca.h @@ -101,46 +101,45 @@ class LIBARDOUR_API VCA : public Stripable, static uint32_t get_next_vca_number (); static void set_next_vca_number (uint32_t); - virtual boost::shared_ptr<GainControl> gain_control() const { return _gain_control; } - virtual boost::shared_ptr<SoloControl> solo_control() const { return _solo_control; } - virtual boost::shared_ptr<MuteControl> mute_control() const { return _mute_control; } - virtual boost::shared_ptr<AutomationControl> rec_enable_control() const { return _recenable_control; } - virtual boost::shared_ptr<MonitorControl> monitoring_control() const { return _monitor_control; } + boost::shared_ptr<GainControl> gain_control() const { return _gain_control; } + boost::shared_ptr<SoloControl> solo_control() const { return _solo_control; } + boost::shared_ptr<MuteControl> mute_control() const { return _mute_control; } /* null Stripable API, because VCAs don't have any of this */ - virtual boost::shared_ptr<SoloIsolateControl> solo_isolate_control() const { return boost::shared_ptr<SoloIsolateControl>(); } - virtual boost::shared_ptr<SoloSafeControl> solo_safe_control() const { return boost::shared_ptr<SoloSafeControl>(); } - virtual boost::shared_ptr<PeakMeter> peak_meter() { return boost::shared_ptr<PeakMeter>(); } - virtual boost::shared_ptr<const PeakMeter> peak_meter() const { return boost::shared_ptr<PeakMeter>(); } - virtual boost::shared_ptr<PhaseControl> phase_control() const { return boost::shared_ptr<PhaseControl>(); } - virtual boost::shared_ptr<GainControl> trim_control() const { return boost::shared_ptr<GainControl>(); } - virtual boost::shared_ptr<AutomationControl> pan_azimuth_control() const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> pan_elevation_control() const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> pan_width_control() const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> pan_frontback_control() const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> pan_lfe_control() const { return boost::shared_ptr<AutomationControl>(); } - virtual uint32_t eq_band_cnt () const { return 0; } - virtual std::string eq_band_name (uint32_t) const { return std::string(); } - virtual boost::shared_ptr<AutomationControl> eq_gain_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> eq_freq_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> eq_q_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> eq_shape_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> eq_enable_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> eq_hpf_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> comp_enable_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> comp_threshold_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> comp_speed_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> comp_mode_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> comp_makeup_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> comp_redux_controllable () const { return boost::shared_ptr<AutomationControl>(); } - virtual std::string comp_mode_name (uint32_t mode) const { return std::string(); } - virtual std::string comp_speed_name (uint32_t mode) const { return std::string(); } - virtual boost::shared_ptr<AutomationControl> send_level_controllable (uint32_t n) const { return boost::shared_ptr<AutomationControl>(); } - virtual boost::shared_ptr<AutomationControl> send_enable_controllable (uint32_t n) const { return boost::shared_ptr<AutomationControl>(); } - virtual std::string send_name (uint32_t n) const { return std::string(); } - virtual boost::shared_ptr<AutomationControl> master_send_enable_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<SoloIsolateControl> solo_isolate_control() const { return boost::shared_ptr<SoloIsolateControl>(); } + boost::shared_ptr<SoloSafeControl> solo_safe_control() const { return boost::shared_ptr<SoloSafeControl>(); } + boost::shared_ptr<PeakMeter> peak_meter() { return boost::shared_ptr<PeakMeter>(); } + boost::shared_ptr<const PeakMeter> peak_meter() const { return boost::shared_ptr<PeakMeter>(); } + boost::shared_ptr<PhaseControl> phase_control() const { return boost::shared_ptr<PhaseControl>(); } + boost::shared_ptr<GainControl> trim_control() const { return boost::shared_ptr<GainControl>(); } + boost::shared_ptr<AutomationControl> pan_azimuth_control() const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> pan_elevation_control() const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> pan_width_control() const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> pan_frontback_control() const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> pan_lfe_control() const { return boost::shared_ptr<AutomationControl>(); } + uint32_t eq_band_cnt () const { return 0; } + std::string eq_band_name (uint32_t) const { return std::string(); } + boost::shared_ptr<AutomationControl> eq_gain_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> eq_freq_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> eq_q_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> eq_shape_controllable (uint32_t band) const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> eq_enable_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> eq_hpf_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> comp_enable_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> comp_threshold_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> comp_speed_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> comp_mode_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> comp_makeup_controllable () const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> comp_redux_controllable () const { return boost::shared_ptr<AutomationControl>(); } + std::string comp_mode_name (uint32_t mode) const { return std::string(); } + std::string comp_speed_name (uint32_t mode) const { return std::string(); } + boost::shared_ptr<AutomationControl> send_level_controllable (uint32_t n) const { return boost::shared_ptr<AutomationControl>(); } + boost::shared_ptr<AutomationControl> send_enable_controllable (uint32_t n) const { return boost::shared_ptr<AutomationControl>(); } + std::string send_name (uint32_t n) const { return std::string(); } + boost::shared_ptr<AutomationControl> master_send_enable_controllable () const { return boost::shared_ptr<AutomationControl>(); } boost::shared_ptr<MonitorProcessor> monitor_control() const { return boost::shared_ptr<MonitorProcessor>(); } + boost::shared_ptr<MonitorControl> monitoring_control() const { return boost::shared_ptr<MonitorControl>(); } private: uint32_t _number; @@ -148,9 +147,7 @@ class LIBARDOUR_API VCA : public Stripable, boost::shared_ptr<GainControl> _gain_control; boost::shared_ptr<SoloControl> _solo_control; boost::shared_ptr<MuteControl> _mute_control; - boost::shared_ptr<AutomationControl> _recenable_control; - // boost::shared_ptr<AutomationControl> _record_safe_control; - boost::shared_ptr<MonitorControl> _monitor_control; + static uint32_t next_number; static Glib::Threads::Mutex number_lock; |