mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-16 02:16:09 +01:00
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
This commit is contained in:
parent
0b70898695
commit
d97b3d8f28
1 changed files with 14 additions and 40 deletions
|
|
@ -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.
|
||||
*/
|
||||
|
||||
/* 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 {
|
||||
|
||||
/* 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue