summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/source.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-08-11 03:24:57 +0000
committerDavid Robillard <d@drobilla.net>2006-08-11 03:24:57 +0000
commit30c08ba655330232767554c48bda1975bfb5628c (patch)
treec6bf6b62de69afdd6b2a42ef3a7d9f80e0f65f7c /libs/ardour/ardour/source.h
parentab6f1ed9bafa869648b6e94ee5186ff317b32c3e (diff)
- Changed IO's vector<Port*>'s to PortList
- Added new Port classes, code to drive them - Added PortList, which is a filthy mess ATM (nevermind that, it's the interface that's important at this stage) - Added ChanCount, though it isn't very thoroughly used yet. That's the next step.... - Fixed a few bugs relating to loading sessions saved with trunk - Fixed a few random other bugs Slowly working towards type agnosticism while keeping all the former code/logic intact is the name of the game here Warning: Removing ports is currently (intentionally) broken due solely to laziness. git-svn-id: svn://localhost/ardour2/branches/midi@786 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/source.h')
-rw-r--r--libs/ardour/ardour/source.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h
index f57ea79854..dc1e93f8f2 100644
--- a/libs/ardour/ardour/source.h
+++ b/libs/ardour/ardour/source.h
@@ -46,9 +46,16 @@ class Source : public Stateful, public sigc::trackable
uint32_t use_cnt() const { return _use_cnt; }
void use ();
void release ();
+
+ virtual void mark_for_remove() = 0;
time_t timestamp() const { return _timestamp; }
void stamp (time_t when) { _timestamp = when; }
+
+ /** @return the number of items in this source */
+ jack_nframes_t length() const { return _length; }
+
+ virtual jack_nframes_t natural_position() const { return 0; }
XMLNode& get_state ();
int set_state (const XMLNode&);
@@ -56,9 +63,12 @@ class Source : public Stateful, public sigc::trackable
sigc::signal<void,Source *> GoingAway;
protected:
+ void update_length (jack_nframes_t pos, jack_nframes_t cnt);
+
string _name;
uint32_t _use_cnt;
time_t _timestamp;
+ jack_nframes_t _length;
private:
PBD::ID _id;