IO::IO (Session& s, const string& name,
int input_min, int input_max, int output_min, int output_max,
DataType default_type, bool public_ports)
- : Automatable (s, name),
+ : SessionObject(s, name),
+ AutomatableControls (s),
_output_buffers (new BufferSet()),
_active(true),
_default_type (default_type),
deferred_state = 0;
boost::shared_ptr<AutomationList> gl(
- new AutomationList(Parameter(GainAutomation)));
+ new AutomationList(Evoral::Parameter(GainAutomation)));
_gain_control = boost::shared_ptr<GainControl>(
new GainControl(X_("gaincontrol"), *this, gl));
}
IO::IO (Session& s, const XMLNode& node, DataType dt)
- : Automatable (s, "unnamed io"),
- _output_buffers (new BufferSet()),
+ : SessionObject(s, "unnamed io"),
+ AutomatableControls (s),
+ _output_buffers (new BufferSet()),
_active(true),
_default_type (dt)
{
apply_gain_automation = false;
boost::shared_ptr<AutomationList> gl(
- new AutomationList(Parameter(GainAutomation)));
+ new AutomationList(Evoral::Parameter(GainAutomation)));
_gain_control = boost::shared_ptr<GainControl>(
new GainControl(X_("gaincontrol"), *this, gl));
BufferSet::iterator o = outs.begin(*t);
for (PortSet::iterator i = _inputs.begin(*t); i != _inputs.end(*t); ++i, ++o) {
+ (*i).cycle_start (nframes, offset);
o->read_from(i->get_buffer(), nframes, offset);
}
if ((*iter)->name() == X_("Automation")) {
- set_automation_state (*(*iter), Parameter(GainAutomation));
+ set_automation_state (*(*iter), Evoral::Parameter(GainAutomation));
}
if ((*iter)->name() == X_("controllable")) {
void
IO::clear_automation ()
{
- Automatable::clear (); // clears gain automation
+ data().clear (); // clears gain automation
_panner->clear_automation ();
}
void
-IO::set_parameter_automation_state (Parameter param, AutoState state)
+IO::set_parameter_automation_state (Evoral::Parameter param, AutoState state)
{
// XXX: would be nice to get rid of this special hack
bool changed = false;
{
- Glib::Mutex::Lock lm (_control_lock);
+ Glib::Mutex::Lock lm (control_lock());
boost::shared_ptr<AutomationList> gain_auto
= boost::dynamic_pointer_cast<AutomationList>(_gain_control->list());
}
} else {
- Automatable::set_parameter_automation_state(param, state);
+ AutomatableControls::set_parameter_automation_state(param, state);
}
}
void
IO::automation_snapshot (nframes_t now, bool force)
{
- Automatable::automation_snapshot (now, force);
+ AutomatableControls::automation_snapshot (now, force);
if (_last_automation_snapshot > now || (now - _last_automation_snapshot) > _automation_interval) {
_panner->snapshot (now);
);
}
+void
+IO::prepare_inputs (nframes_t nframes, nframes_t offset)
+{
+ /* io_lock, not taken: function must be called from Session::process() calltree */
+
+ for (PortSet::iterator i = _inputs.begin(); i != _inputs.end(); ++i) {
+ (*i).cycle_start (nframes, offset);
+ }
+}