summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-01-16 21:34:06 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-01-16 21:34:06 +0000
commitd97b3d8f285fcc811e435ea40e943efa7fb23f79 (patch)
tree829548a94899ee43052611876d92e9b52cec4327
parent0b70898695ccc29a49c314ed770155a5a200925d (diff)
lincoln's fix for punch in latency compensation, for 2.X
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6509 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/audio_diskstream.cc54
1 files changed, 14 insertions, 40 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 0f8df820bf..fe0523b6fc 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -417,10 +417,10 @@ AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t nfram
if (_alignment_style == ExistingMaterial) {
//cerr << "A FRF += " << _session.worst_output_latency () << endl;
- // first_recordable_frame += _session.worst_output_latency();
+ first_recordable_frame += _session.worst_output_latency();
} else {
// cerr << "B FRF += " << _roll_delay<< endl;
- // first_recordable_frame += _roll_delay;
+ first_recordable_frame += _roll_delay;
}
} else {
@@ -429,49 +429,25 @@ AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t nfram
if (_alignment_style == ExistingMaterial) {
- if (!Config->get_punch_in()) {
-
- /* manual punch in happens at the correct transport frame
- because the user hit a button. but to get alignment correct
- we have to back up the position of the new region to the
- appropriate spot given the roll delay.
- */
-
- capture_start_frame -= _roll_delay;
-
- /* XXX paul notes (august 2005): i don't know why
- this is needed.
- */
-
- // cerr << "1 FRF += " << _capture_offset << endl;
- first_recordable_frame += _capture_offset;
-
- } else {
+ /* manual punch in happens at the correct transport frame
+ because the user hit a button. but to get alignment correct
+ we have to back up the position of the new region to the
+ appropriate spot given the roll delay.
+ */
- /* autopunch toggles recording at the precise
- transport frame, and then the DS waits
- to start recording for a time that depends
- on the output latency.
- */
- // cerr << "2 FRF += " << _session.worst_output_latency() << endl;
- first_recordable_frame += _session.worst_output_latency();
- }
+ /* autopunch toggles recording at the precise
+ transport frame, and then the DS waits
+ to start recording for a time that depends
+ on the output latency.
+ */
+ first_recordable_frame += _session.worst_output_latency();
} else {
-
- if (Config->get_punch_in()) {
- // cerr << "3 FRF += " << _roll_delay << endl;
- first_recordable_frame += _roll_delay;
- } else {
- capture_start_frame -= _roll_delay;
- }
+ capture_start_frame -= _roll_delay;
}
-
}
- // cerr << _name << " FRF = " << first_recordable_frame << " CSF = " << capture_start_frame << endl;
-
if (recordable() && destructive()) {
boost::shared_ptr<ChannelList> c = channels.reader();
for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
@@ -503,8 +479,6 @@ AudioDiskstream::check_record_status (nframes_t transport_frame, nframes_t nfram
} else {
last_recordable_frame += _roll_delay;
}
-
- first_recordable_frame = max_frames;
}
last_possibly_recording = possibly_recording;