diff options
author | David Robillard <d@drobilla.net> | 2006-08-29 21:21:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-08-29 21:21:48 +0000 |
commit | 82232f06ba3eea4a2b4342ad91fab552f4044402 (patch) | |
tree | d517cb47c017f51e2ecd9450624b86eb70d9f97b /libs/ardour/ardour/source.h | |
parent | 25d1670a61d19e795227b939a98be9cf5a050c67 (diff) |
Merged with trunk R861
Possible new bugs - not very thoroughly tested, but at least functional at first glance
git-svn-id: svn://localhost/ardour2/branches/midi@870 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/source.h')
-rw-r--r-- | libs/ardour/ardour/source.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index a8d0fed20b..1728cdb477 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -24,15 +24,16 @@ #include <string> #include <sigc++/signal.h> +#include <boost/enable_shared_from_this.hpp> -#include <pbd/stateful.h> +#include <pbd/statefuldestructible.h> #include <ardour/ardour.h> #include <ardour/data_type.h> namespace ARDOUR { -class Source : public Stateful, public sigc::trackable +class Source : public PBD::StatefulDestructible, public sigc::trackable, public boost::enable_shared_from_this<Source> { public: Source (std::string name, DataType type); @@ -42,13 +43,9 @@ class Source : public Stateful, public sigc::trackable std::string name() const { return _name; } int set_name (std::string str, bool destructive); - const PBD::ID& id() const { return _id; } + DataType type() { return _type; } - uint32_t use_cnt() const { return _use_cnt; } - void use (); - void release (); - - virtual void mark_for_remove() = 0; + const PBD::ID& id() const { return _id; } time_t timestamp() const { return _timestamp; } void stamp (time_t when) { _timestamp = when; } @@ -58,18 +55,19 @@ class Source : public Stateful, public sigc::trackable virtual jack_nframes_t natural_position() const { return 0; } + virtual void mark_for_remove() = 0; + virtual void mark_streaming_write_completed () = 0; + XMLNode& get_state (); int set_state (const XMLNode&); - + static sigc::signal<void,Source*> SourceCreated; - sigc::signal<void,Source *> GoingAway; protected: void update_length (jack_nframes_t pos, jack_nframes_t cnt); string _name; DataType _type; - uint32_t _use_cnt; time_t _timestamp; jack_nframes_t _length; |