summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-09-25 19:47:14 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-09-25 19:47:14 +0000
commitc1e827cb48667e2744add1446c24162c9e6db730 (patch)
treea5280674a2036567e4123805b34e2fccb63f617e
parent4dea631ccb46336d9e20df12962580a63ad8b9d7 (diff)
ardour has never done latency compensations on busses, so what was Route::check_initial_delay() doing? Moved to Track::check_initial_delay() - fixes loopback/play-along recording via the master (or other) busses
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@10120 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/ardour/route.h2
-rw-r--r--libs/ardour/ardour/track.h2
-rw-r--r--libs/ardour/route.cc33
-rw-r--r--libs/ardour/track.cc31
4 files changed, 40 insertions, 28 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index 75dfdd8fb0..f026bb0d46 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -292,7 +292,7 @@ class Route : public IO
gain_t desired_solo_gain;
gain_t desired_mute_gain;
- nframes_t check_initial_delay (nframes_t, nframes_t&);
+ virtual nframes_t check_initial_delay (nframes_t nframes, nframes_t&);
nframes_t _initial_delay;
nframes_t _roll_delay;
diff --git a/libs/ardour/ardour/track.h b/libs/ardour/ardour/track.h
index 69754eeb06..d5b3365c55 100644
--- a/libs/ardour/ardour/track.h
+++ b/libs/ardour/ardour/track.h
@@ -144,6 +144,8 @@ class Track : public Route
Track& track;
};
+ nframes_t check_initial_delay (nframes_t nframes, nframes_t&);
+
//virtual void diskstream_record_enable_changed (void *src) = 0;
//virtual void diskstream_input_channel_changed (void *src) = 0;
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 5df739bc44..72b5c33057 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -2347,34 +2347,13 @@ Route::no_roll (nframes_t nframes, nframes_t start_frame, nframes_t end_frame,
}
nframes_t
-Route::check_initial_delay (nframes_t nframes, nframes_t& transport_frame)
+Route::check_initial_delay (nframes_t nframes, nframes_t&)
{
- if (_roll_delay > nframes) {
-
- _roll_delay -= nframes;
- silence (nframes);
- /* transport frame is not legal for caller to use */
- return 0;
-
- } else if (_roll_delay > 0) {
-
- nframes -= _roll_delay;
-
- silence (_roll_delay);
-
- /* we've written _roll_delay of samples into the
- output ports, so make a note of that for
- future reference.
- */
-
- increment_output_offset (_roll_delay);
-
- transport_frame += _roll_delay;
-
- _roll_delay = 0;
- }
-
- return nframes;
+ /* no latency compensation via roll delay on busses ...
+ see Track::check_initial_delay() for the track
+ implementation.
+ */
+ return nframes;
}
int
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 679f9d2380..63254a36ea 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -209,3 +209,34 @@ Track::zero_diskstream_id_in_xml (XMLNode& node)
node.add_property ("diskstream-id", "0");
}
}
+
+nframes_t
+Track::check_initial_delay (nframes_t nframes, nframes_t& transport_frame)
+{
+ if (_roll_delay > nframes) {
+
+ _roll_delay -= nframes;
+ silence (nframes);
+ /* transport frame is not legal for caller to use */
+ return 0;
+
+ } else if (_roll_delay > 0) {
+
+ nframes -= _roll_delay;
+
+ silence (_roll_delay);
+
+ /* we've written _roll_delay of samples into the
+ output ports, so make a note of that for
+ future reference.
+ */
+
+ increment_output_offset (_roll_delay);
+
+ transport_frame += _roll_delay;
+
+ _roll_delay = 0;
+ }
+
+ return nframes;
+}