diff options
author | Sampo Savolainen <v2@iki.fi> | 2007-07-21 13:13:20 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2007-07-21 13:13:20 +0000 |
commit | 91e8cfbeb13fbf834debb81acd4783949ec5a9d7 (patch) | |
tree | e6eafcb4d35f4a6ff72b364f0ef4bc79d1163945 | |
parent | 100bd1328b4dd653e5b2de1939dd791f230721db (diff) |
Add a safeguard which will eliminate false disk underruns when punching
in. Not a complete fix though, this is more a workaround.
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2169 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 62f8fb9c36..4744eb2d17 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -555,6 +555,12 @@ 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) { |