diff options
author | David Robillard <d@drobilla.net> | 2009-02-16 18:08:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-16 18:08:22 +0000 |
commit | 900309993c485527145be4265247bd521073ee61 (patch) | |
tree | 29360e453ffe3f7b4c099a199cb2d5d587d14580 /libs/ardour/ardour/source.h | |
parent | 80e3845982659b796315a501268478c63ae2f21a (diff) |
Move duplicated AudioFileSource::Flags and SMFSource::Flags into Source.
Clean up source stuff.
git-svn-id: svn://localhost/ardour2/branches/3.0@4605 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/source.h')
-rw-r--r-- | libs/ardour/ardour/source.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/libs/ardour/ardour/source.h b/libs/ardour/ardour/source.h index b585509c51..137aad5fbe 100644 --- a/libs/ardour/ardour/source.h +++ b/libs/ardour/ardour/source.h @@ -40,7 +40,18 @@ class Playlist; class Source : public SessionObject, public ARDOUR::Readable { public: - Source (Session&, const std::string& name, DataType type); + enum Flag { + Writable = 0x1, + CanRename = 0x2, + Broadcast = 0x4, + Removable = 0x8, + RemovableIfEmpty = 0x10, + RemoveAtDestroy = 0x20, + NoPeakFile = 0x40, + Destructive = 0x80 + }; + + Source (Session&, const std::string& name, DataType type, Flag flags=Flag(0)); Source (Session&, const XMLNode&); virtual ~Source (); @@ -68,7 +79,7 @@ class Source : public SessionObject, public ARDOUR::Readable virtual bool destructive() const { return false; } virtual bool length_mutable() const { return false; } - void use () { _in_use++; } + void use () { _in_use++; } void disuse () { if (_in_use) { _in_use--; } } void add_playlist (boost::shared_ptr<ARDOUR::Playlist>); @@ -95,9 +106,12 @@ class Source : public SessionObject, public ARDOUR::Readable virtual const Evoral::TimeConverter<double, nframes_t>& time_converter() const { return Evoral::IdentityConverter<double, nframes_t>(); } + + Flag flags() const { return _flags; } protected: DataType _type; + Flag _flags; time_t _timestamp; nframes_t _length; bool _analysed; |