}
void
-IO::silence (nframes_t nframes)
+IO::silence (framecnt_t nframes)
{
/* io_lock, not taken: function must be called from Session::process() calltree */
int
IO::disconnect (Port* our_port, string other_port, void* src)
{
- assert (!AudioEngine::instance()->process_lock().trylock());
-
if (other_port.length() == 0 || our_port == 0) {
return 0;
}
-
{
Glib::Mutex::Lock lm (io_lock);
return 0;
}
-/** Caller must hold process lock */
int
IO::connect (Port* our_port, string other_port, void* src)
{
- assert (!AudioEngine::instance()->process_lock().trylock());
-
if (other_port.length() == 0 || our_port == 0) {
return 0;
}
int
IO::disconnect (void* src)
{
- BLOCK_PROCESS_CALLBACK ();
-
{
Glib::Mutex::Lock lm (io_lock);
change.after = _ports.count ();
change.type = IOChange::ConfigurationChanged;
this->changed (change, src); /* EMIT SIGNAL */
+ _buffers.attach_buffers (_ports);
setup_bundle ();
_session.set_dirty ();
}
}
void
-IO::set_port_latency (nframes_t nframes)
+IO::set_port_latency (framecnt_t nframes)
{
Glib::Mutex::Lock lm (io_lock);
}
}
-nframes_t
+framecnt_t
IO::latency () const
{
- nframes_t max_latency;
- nframes_t latency;
+ framecnt_t max_latency;
+ framecnt_t latency;
max_latency = 0;
}
void
-IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, framepos_t end_frame, nframes_t nframes)
+IO::process_input (boost::shared_ptr<Processor> proc, framepos_t start_frame, framepos_t end_frame, pframes_t nframes)
{
- BufferSet bufs;
-
/* don't read the data into new buffers - just use the port buffers directly */
- bufs.attach_buffers (_ports, nframes, 0);
- proc->run (bufs, start_frame, end_frame, nframes, true);
+ _buffers.get_jack_port_addresses (_ports, nframes, 0);
+ proc->run (_buffers, start_frame, end_frame, nframes, true);
}
void
-IO::collect_input (BufferSet& bufs, nframes_t nframes, ChanCount offset)
+IO::collect_input (BufferSet& bufs, pframes_t nframes, ChanCount offset)
{
assert(bufs.available() >= _ports.count());
}
void
-IO::copy_to_outputs (BufferSet& bufs, DataType type, nframes_t nframes, nframes_t offset)
+IO::copy_to_outputs (BufferSet& bufs, DataType type, pframes_t nframes, framecnt_t offset)
{
// Copy any buffers 1:1 to outputs
return false;
}
+
+bool
+IO::has_port (Port* p) const
+{
+ Glib::Mutex::Lock lm (io_lock);
+ return _ports.contains (p);
+}