13
0

merge in Tracks-derived session-end-is-N-seconds beyond last region end, but define N as zero for Ardour/Mixbus

This commit is contained in:
Paul Davis 2015-05-13 10:39:24 -04:00
parent a9f3ca6a81
commit 289078f7f8
2 changed files with 11 additions and 1 deletions

View File

@ -1811,6 +1811,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
void save_as_bring_callback (uint32_t, uint32_t, std::string); void save_as_bring_callback (uint32_t, uint32_t, std::string);
static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath); static int get_session_info_from_path (XMLTree& state_tree, const std::string& xmlpath);
static const uint32_t session_end_shift;
}; };

View File

@ -139,6 +139,13 @@ const framecnt_t Session::bounce_chunk_size = 65536;
static void clean_up_session_event (SessionEvent* ev) { delete ev; } static void clean_up_session_event (SessionEvent* ev) { delete ev; }
const SessionEvent::RTeventCallback Session::rt_cleanup (clean_up_session_event); const SessionEvent::RTeventCallback Session::rt_cleanup (clean_up_session_event);
// seconds should be added afte the region exceeds end marker
#ifdef USE_TRACKS_CODE_FEATURES
const uint32_t Session::session_end_shift = 5;
#else
const uint32_t Session::session_end_shift = 0;
#endif
/** @param snapshot_name Snapshot name, without .ardour suffix */ /** @param snapshot_name Snapshot name, without .ardour suffix */
Session::Session (AudioEngine &eng, Session::Session (AudioEngine &eng,
const string& fullpath, const string& fullpath,
@ -3944,9 +3951,11 @@ Session::maybe_update_session_range (framepos_t a, framepos_t b)
return; return;
} }
framepos_t session_end_marker_shift_samples = session_end_shift * _nominal_frame_rate;
if (_session_range_location == 0) { if (_session_range_location == 0) {
set_session_range_location (a, b); set_session_range_location (a, b + session_end_marker_shift_samples);
} else { } else {