summaryrefslogtreecommitdiff
path: root/libs/ardour/io.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-03-11 02:55:52 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-03-11 02:55:52 +0000
commitd155f32039570e9e0cde11b42e395ca2bcc89ffd (patch)
tree160ca7969013b713d70f31f15f328e7a11a723dd /libs/ardour/io.cc
parente8060844021cdf5b4c6f3e284a892e70109787c3 (diff)
sorta-kinda working latency compensation, latency reporting and capture alignment ... working except that we report the wrong information to JACK and i've noticed a couple of odd circumstances where turning on a latent plugin caused punch recording to fail
git-svn-id: svn://localhost/ardour2/branches/3.0@9121 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r--libs/ardour/io.cc39
1 files changed, 16 insertions, 23 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc
index fce6a669f9..4cb1cca5b6 100644
--- a/libs/ardour/io.cc
+++ b/libs/ardour/io.cc
@@ -96,6 +96,18 @@ IO::~IO ()
}
}
+void
+IO::increment_port_buffer_offset (pframes_t offset)
+{
+ /* io_lock, not taken: function must be called from Session::process() calltree */
+
+ if (_direction == Output) {
+ for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
+ i->increment_port_buffer_offset (offset);
+ }
+ }
+}
+
void
IO::silence (framecnt_t nframes)
{
@@ -1133,16 +1145,6 @@ IO::set_name (const string& requested_name)
return r;
}
-void
-IO::set_port_latency (framecnt_t nframes)
-{
- Glib::Mutex::Lock lm (io_lock);
-
- for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
- i->set_latency (nframes);
- }
-}
-
framecnt_t
IO::latency () const
{
@@ -1154,26 +1156,17 @@ IO::latency () const
/* io lock not taken - must be protected by other means */
for (PortSet::const_iterator i = _ports.begin(); i != _ports.end(); ++i) {
- if ((latency = i->total_latency ()) > max_latency) {
+ if ((latency = i->public_latency_range (_direction == Output).max) > max_latency) {
max_latency = latency;
}
}
- DEBUG_TRACE (DEBUG::Latency, string_compose ("%1: max latency from %2 ports = %3\n",
- name(), _ports.num_ports(), max_latency));
+ DEBUG_TRACE (DEBUG::Latency, string_compose ("%1: max %4 latency from %2 ports = %3\n",
+ name(), _ports.num_ports(), max_latency,
+ ((_direction == Output) ? "PLAYBACK" : "CAPTURE")));
return max_latency;
}
-void
-IO::update_port_total_latencies ()
-{
- /* io_lock, not taken: function must be called from Session::process() calltree */
-
- for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
- _session.engine().update_total_latency (*i);
- }
-}
-
int
IO::connect_ports_to_bundle (boost::shared_ptr<Bundle> c, void* src)
{