Add support for VST effSetBypass #7266
[ardour.git] / libs / ardour / ardour / source.h
index 78b3cfaa2110f369f80fc2b336fe996e55f7e30a..71595592fb86f91f23427bcb081371d4658d5b29 100644 (file)
@@ -47,9 +47,13 @@ class LIBARDOUR_API Source : public SessionObject
                RemovableIfEmpty = 0x10,
                RemoveAtDestroy = 0x20,
                NoPeakFile = 0x40,
-               Destructive = 0x80
+               Destructive = 0x80,
+               Empty = 0x100, /* used for MIDI only */
+               RF64_RIFF = 0x200,
        };
 
+       typedef Glib::Threads::Mutex::Lock Lock;
+
        Source (Session&, DataType type, const std::string& name, Flag flags=Flag(0));
        Source (Session&, const XMLNode&);
 
@@ -68,8 +72,8 @@ class LIBARDOUR_API Source : public SessionObject
 
        void mark_for_remove();
 
-       virtual void mark_streaming_write_started () {}
-       virtual void mark_streaming_write_completed () = 0;
+       virtual void mark_streaming_write_started (const Lock& lock) {}
+       virtual void mark_streaming_write_completed (const Lock& lock) = 0;
 
        virtual void session_saved() {}
 
@@ -78,7 +82,9 @@ class LIBARDOUR_API Source : public SessionObject
 
        bool         destructive() const       { return (_flags & Destructive); }
        bool         writable () const;
+#ifdef XXX_OLD_DESTRUCTIVE_API_XXX
        virtual bool set_destructive (bool /*yn*/) { return false; }
+#endif
        virtual bool length_mutable() const    { return false; }
 
        static PBD::Signal1<void,Source*>             SourceCreated;
@@ -108,6 +114,9 @@ class LIBARDOUR_API Source : public SessionObject
        bool used() const { return use_count() > 0; }
        uint32_t level() const { return _level; }
 
+       std::string ancestor_name() { return _ancestor_name.empty() ? name() : _ancestor_name; }
+       void set_ancestor_name(const std::string& name) { _ancestor_name = name; }
+
   protected:
        DataType            _type;
        Flag                _flags;
@@ -118,6 +127,7 @@ class LIBARDOUR_API Source : public SessionObject
         mutable Glib::Threads::Mutex _analysis_lock;
        gint                _use_count; /* atomic */
        uint32_t            _level; /* how deeply nested is this source w.r.t a disk file */
+       std::string         _ancestor_name;
 
   private:
        void fix_writable_flags ();