diff options
author | Sampo Savolainen <v2@iki.fi> | 2007-07-21 13:16:36 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2007-07-21 13:16:36 +0000 |
commit | 722ea289a7e3aa0e4c346d81c2ed99aa981ba77d (patch) | |
tree | ccd7de595be5b10feaf825d66f793ce21863a471 /libs | |
parent | a485d106155f8e21cb8670b588b966cb503fb04b (diff) |
Workaround / safeguard which should enable punching in more than once
due to wrongly set last_recordable_frame.
git-svn-id: svn://localhost/ardour2/trunk@2170 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index d0e2b24263..ceee6467ab 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -557,6 +557,11 @@ AudioDiskstream::process (nframes_t transport_frame, nframes_t nframes, nframes_ if (nominally_recording || (_session.get_record_enabled() && Config->get_punch_in())) { OverlapType ot; + // Safeguard against situations where process() goes haywire when autopunching and last_recordable_frame < first_recordable_frame + if (last_recordable_frame < first_recordable_frame) { + last_recordable_frame = max_frames; + } + ot = coverage (first_recordable_frame, last_recordable_frame, transport_frame, transport_frame + nframes); switch (ot) { |