using namespace ARDOUR;
using namespace PBD;
-PortInsert::PortInsert (Session& s, boost::shared_ptr<MuteMaster> mm)
+PortInsert::PortInsert (Session& s, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster> mm)
: IOProcessor (s, true, true, string_compose (_("insert %1"), (bitslot = s.next_insert_id()) + 1), "")
- , _out (new Delivery (s, _output, mm, _name, Delivery::Insert))
+ , _out (new Delivery (s, _output, pannable, mm, _name, Delivery::Insert))
{
_mtdm = 0;
_latency_detect = false;
}
void
-PortInsert::set_measured_latency (nframes_t n)
+PortInsert::set_measured_latency (framecnt_t n)
{
_measured_latency = n;
}
-nframes_t
+framecnt_t
PortInsert::latency() const
{
/* because we deliver and collect within the same cycle,
}
void
-PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, nframes_t nframes, bool)
+PortInsert::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool)
{
if (_output->n_ports().n_total() == 0) {
return;
node.add_property ("type", "port");
snprintf (buf, sizeof (buf), "%" PRIu32, bitslot);
node.add_property ("bitslot", buf);
- snprintf (buf, sizeof (buf), "%u", _measured_latency);
+ snprintf (buf, sizeof (buf), "%" PRId64, _measured_latency);
node.add_property("latency", buf);
snprintf (buf, sizeof (buf), "%u", _session.get_block_size());
node.add_property("block_size", buf);
const XMLNode* insert_node = &node;
- // legacy sessions: search for child IOProcessor node
+ // legacy sessions: search for child Redirect node
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
- if ((*niter)->name() == "IOProcessor") {
+ if ((*niter)->name() == "Redirect") {
insert_node = *niter;
break;
}
return 0;
}
-ARDOUR::nframes_t
+ARDOUR::framecnt_t
PortInsert::signal_latency() const
{
/* because we deliver and collect within the same cycle,
}
}
-/** Caller must not hold process lock */
+/** Caller must hold process lock */
bool
PortInsert::configure_io (ChanCount in, ChanCount out)
{
+ assert (!AudioEngine::instance()->process_lock().trylock());
+
/* for an insert, processor input corresponds to IO output, and vice versa */
- {
- Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-
- if (_input->ensure_io (in, false, this) != 0) {
- return false;
- }
-
- if (_output->ensure_io (out, false, this) != 0) {
- return false;
- }
+ if (_input->ensure_io (in, false, this) != 0) {
+ return false;
+ }
+
+ if (_output->ensure_io (out, false, this) != 0) {
+ return false;
}
return Processor::configure_io (in, out);