diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-16 13:03:09 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-12-16 13:06:13 -0500 |
commit | 12803c4255508b82d32c2d2f2da1462c3b905a02 (patch) | |
tree | 6c8ec33a2cd5466da52f9ed70ab7500661796a33 /libs/ardour/location.cc | |
parent | 94e2b61a86b59c960c9d6ea87a8af2e96bba77e6 (diff) |
use new parameter to limit minimum length of any range location
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r-- | libs/ardour/location.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 019e25dd96..fc961b2820 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -220,7 +220,12 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute) assert (_end >= 0); return 0; - } + } else { + /* range locations must exceed a minimum duration */ + if (_end - s < Config->get_range_location_minimum()) { + return -1; + } + } if (s != _start) { @@ -283,6 +288,11 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute) assert (_end >= 0); return 0; + } else { + /* range locations must exceed a minimum duration */ + if (e - _start < Config->get_range_location_minimum()) { + return -1; + } } if (e != _end) { @@ -340,6 +350,11 @@ Location::set (framepos_t s, framepos_t e, bool allow_bbt_recompute) assert (_end >= 0); } else { + + /* range locations must exceed a minimum duration */ + if (e - s < Config->get_range_location_minimum()) { + return -1; + } if (s != _start) { |