diff options
author | David Robillard <d@drobilla.net> | 2009-02-20 00:30:42 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-20 00:30:42 +0000 |
commit | c9582da23371bfd40f3087f5a9112d081ef012da (patch) | |
tree | d039fc76d262918d0335941ad5933bf7ccebfd05 /libs/ardour/ardour/source.h | |
parent | bed0d89337b0775e669439ef4e0759feb7ddc74e (diff) |
Make source length a dynamic thing.
Update MIDI region length (actually and visually) when position changes.
git-svn-id: svn://localhost/ardour2/branches/3.0@4644 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/source.h')
-rw-r--r-- | libs/ardour/ardour/source.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index 36d7e1fe96..7905debbcc 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -61,7 +61,8 @@ class Source : public SessionObject, public boost::noncopyable time_t timestamp() const { return _timestamp; } void stamp (time_t when) { _timestamp = when; } - sframes_t length() const { return _length; } + virtual sframes_t length (sframes_t pos) const = 0; + virtual void update_length (sframes_t pos, sframes_t cnt) = 0; virtual const Glib::ustring& path() const = 0; @@ -104,10 +105,8 @@ class Source : public SessionObject, public boost::noncopyable std::string get_transients_path() const; int load_transients (const std::string&); - void update_length (sframes_t pos, sframes_t cnt); - - int64_t timeline_position() const { return _timeline_position; } - virtual void set_timeline_position (int64_t pos); + sframes_t timeline_position() const { return _timeline_position; } + virtual void set_timeline_position (sframes_t pos); void set_allow_remove_if_empty (bool yn); @@ -118,8 +117,7 @@ class Source : public SessionObject, public boost::noncopyable DataType _type; Flag _flags; time_t _timestamp; - sframes_t _length; - int64_t _timeline_position; + sframes_t _timeline_position; bool _analysed; mutable Glib::Mutex _lock; mutable Glib::Mutex _analysis_lock; |