diff options
author | David Robillard <d@drobilla.net> | 2008-01-14 01:30:38 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-01-14 01:30:38 +0000 |
commit | 5a1d3e851dc0659965e12f1bc7d1ff3bf7f7162a (patch) | |
tree | 81f6c88af7b4d11586a6f73452aad5862ef47d2f /libs | |
parent | 794917fca7c516cbe287f5aa2ec7c1dbf058089a (diff) |
Partially fix MIDI region trim and extend.
git-svn-id: svn://localhost/ardour2/trunk@2911 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/midi_source.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/source.h | 3 | ||||
-rw-r--r-- | libs/ardour/region.cc | 8 |
3 files changed, 8 insertions, 5 deletions
diff --git a/libs/ardour/ardour/midi_source.h b/libs/ardour/ardour/midi_source.h index 433e7ceee9..c83debec3d 100644 --- a/libs/ardour/ardour/midi_source.h +++ b/libs/ardour/ardour/midi_source.h @@ -76,6 +76,8 @@ class MidiSource : public Source XMLNode& get_state (); int set_state (const XMLNode&); + + bool length_mutable() const { return true; } virtual void load_model(bool lock=true, bool force_reload=false) = 0; virtual void destroy_model() = 0; diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index 869111bb07..aa8bc0ca1f 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -63,7 +63,8 @@ class Source : public SessionObject XMLNode& get_state (); int set_state (const XMLNode&); - virtual bool destructive() const { return false; } + virtual bool destructive() const { return false; } + virtual bool length_mutable() const { return false; } void use () { _in_use++; } void disuse () { if (_in_use) { _in_use--; } } diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 0505985aea..6d92c0bc88 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -1310,7 +1310,7 @@ Region::source_equivalent (boost::shared_ptr<const Region> other) const bool Region::verify_length (nframes_t len) { - if (source() && source()->destructive()) { + if (source() && (source()->destructive() || source()->length_mutable())) { return true; } @@ -1328,7 +1328,7 @@ Region::verify_length (nframes_t len) bool Region::verify_start_and_length (nframes_t new_start, nframes_t& new_length) { - if (source() && source()->destructive()) { + if (source() && (source()->destructive() || source()->length_mutable())) { return true; } @@ -1346,7 +1346,7 @@ Region::verify_start_and_length (nframes_t new_start, nframes_t& new_length) bool Region::verify_start (nframes_t pos) { - if (source() && source()->destructive()) { + if (source() && (source()->destructive() || source()->length_mutable())) { return true; } @@ -1361,7 +1361,7 @@ Region::verify_start (nframes_t pos) bool Region::verify_start_mutable (nframes_t& new_start) { - if (source() && source()->destructive()) { + if (source() && (source()->destructive() || source()->length_mutable())) { return true; } |