Session-range behavior (libardour part)
This commit is contained in:
parent
22deebb42f
commit
688bd28458
|
@ -468,8 +468,8 @@ public:
|
|||
void set_auto_punch_location (Location *);
|
||||
void set_auto_loop_location (Location *);
|
||||
void set_session_extents (samplepos_t start, samplepos_t end);
|
||||
bool end_is_free () const { return _session_range_end_is_free; }
|
||||
void set_end_is_free (bool);
|
||||
bool session_range_is_free () const { return _session_range_is_free; }
|
||||
void set_session_range_is_free (bool);
|
||||
|
||||
pframes_t get_block_size () const { return current_block_size; }
|
||||
samplecnt_t worst_output_latency () const { return _worst_output_latency; }
|
||||
|
@ -1245,7 +1245,7 @@ private:
|
|||
samplepos_t _transport_sample;
|
||||
gint _seek_counter;
|
||||
Location* _session_range_location; ///< session range, or 0 if there is nothing in the session yet
|
||||
bool _session_range_end_is_free;
|
||||
bool _session_range_is_free;
|
||||
bool _silent;
|
||||
samplecnt_t _remaining_latency_preroll;
|
||||
|
||||
|
|
|
@ -2290,8 +2290,8 @@ LuaBindings::common (lua_State* L)
|
|||
.addFunction ("cfg", &Session::cfg)
|
||||
.addFunction ("route_groups", &Session::route_groups)
|
||||
.addFunction ("new_route_group", &Session::new_route_group)
|
||||
.addFunction ("end_is_free", &Session::end_is_free)
|
||||
.addFunction ("set_end_is_free", &Session::set_end_is_free)
|
||||
.addFunction ("session_range_is_free", &Session::session_range_is_free)
|
||||
.addFunction ("set_session_range_is_free", &Session::set_session_range_is_free)
|
||||
.addFunction ("remove_route_group", (void (Session::*)(RouteGroup*))&Session::remove_route_group)
|
||||
.addFunction ("vca_manager", &Session::vca_manager_ptr)
|
||||
.addExtCFunction ("timecode_to_sample_lua", ARDOUR::LuaAPI::timecode_to_sample_lua)
|
||||
|
|
|
@ -183,7 +183,7 @@ Session::Session (AudioEngine &eng,
|
|||
, _transport_sample (0)
|
||||
, _seek_counter (0)
|
||||
, _session_range_location (0)
|
||||
, _session_range_end_is_free (true)
|
||||
, _session_range_is_free (true)
|
||||
, _silent (false)
|
||||
, _remaining_latency_preroll (0)
|
||||
, _engine_speed (1.0)
|
||||
|
@ -4642,20 +4642,20 @@ Session::maybe_update_session_range (samplepos_t a, samplepos_t b)
|
|||
|
||||
} else {
|
||||
|
||||
if (a < _session_range_location->start()) {
|
||||
if (_session_range_is_free && (a < _session_range_location->start())) {
|
||||
_session_range_location->set_start (a);
|
||||
}
|
||||
|
||||
if (_session_range_end_is_free && (b > _session_range_location->end())) {
|
||||
if (_session_range_is_free && (b > _session_range_location->end())) {
|
||||
_session_range_location->set_end (b);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Session::set_end_is_free (bool yn)
|
||||
Session::set_session_range_is_free (bool yn)
|
||||
{
|
||||
_session_range_end_is_free = yn;
|
||||
_session_range_is_free = yn;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1208,7 +1208,8 @@ Session::state (bool save_template, snapshot_t snapshot_type, bool only_used_ass
|
|||
child = node->add_child ("Path");
|
||||
child->add_content (p);
|
||||
}
|
||||
node->set_property ("end-is-free", _session_range_end_is_free);
|
||||
node->set_property ("end-is-free", _session_range_is_free); //deprecated, but keep storing this value for compatibility with prior v5.
|
||||
node->set_property ("session-range-is-free", _session_range_is_free);
|
||||
}
|
||||
|
||||
/* save the ID counter */
|
||||
|
@ -1559,7 +1560,9 @@ Session::set_state (const XMLNode& node, int version)
|
|||
|
||||
setup_raid_path(_session_dir->root_path());
|
||||
|
||||
node.get_property (X_("end-is-free"), _session_range_end_is_free);
|
||||
node.get_property (X_("end-is-free"), _session_range_is_free); //deprectated, but use old values if they are in the config
|
||||
|
||||
node.get_property (X_("session-range-is-free"), _session_range_is_free);
|
||||
|
||||
uint64_t counter;
|
||||
if (node.get_property (X_("id-counter"), counter)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user