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;
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;
#include "ardour/port.h"
#include "ardour/processor.h"
#include "ardour/record_enable_control.h"
+#include "ardour/record_safe_control.h"
#include "ardour/route_group_specialized.h"
#include "ardour/session.h"
#include "ardour/session_playlists.h"
_record_enable_control.reset (new RecordEnableControl (_session, X_("recenable"), *this));
add_control (_record_enable_control);
- _record_safe_control.reset (new AutomationControl (_session, RecSafeAutomation, ParameterDescriptor (RecSafeAutomation),
- boost::shared_ptr<AutomationList> (new AutomationList (Evoral::Parameter (RecSafeAutomation))),
- X_("recsafe")));
+ _record_safe_control.reset (new RecordSafeControl (_session, X_("recsafe"), *this));
add_control (_record_safe_control);
_monitoring_control.reset (new MonitorControl (_session, X_("monitoring"), *this));
}
bool
-Track::record_safe () const
+Track::can_be_record_safe ()
{
- return _diskstream && _diskstream->record_safe ();
+ return !_record_enable_control->get_value() && _diskstream && _session.writable() && (_freeze_record.state != Frozen);
}
-void
-Track::set_record_safe (bool yn, Controllable::GroupControlDisposition group_override)
+bool
+Track::can_be_record_enabled ()
{
- if (!_session.writable()) {
- return;
- }
-
- if (_freeze_record.state == Frozen) {
- return;
- }
-
- if (record_enabled ()) {
- return;
- }
-
- _rec_safe_control->set_value (yn, group_override);
+ return !_record_safe_control->get_value() && _diskstream && !_diskstream->record_safe() && _session.writable() && (_freeze_record.state != Frozen);
}
void