set + store signal chain latency for all processors; DiskWriter sets its capture_offs...
[ardour.git] / libs / ardour / ardour / file_source.h
index 4f313c5eac9c6b5e44455a334ecfc0590fae2c35..0f3b9bce669388690c33d58f77854fcb09651e00 100644 (file)
@@ -47,7 +47,7 @@ public:
        virtual ~FileSource ();
 
        const std::string& path() const { return _path; }
-       
+
        virtual bool safe_file_extension (const std::string& path) const = 0;
 
        int  move_to_trash (const std::string& trash_dir_name);
@@ -56,9 +56,12 @@ public:
         void mark_immutable_except_write();
        void mark_nonremovable ();
 
-       const std::string& take_id ()        const { return _take_id; }
+       const std::string&   take_id ()        const { return _take_id; }
        bool                 within_session () const { return _within_session; }
        uint16_t             channel()         const { return _channel; }
+       float                gain()            const { return _gain; }
+
+       virtual void set_gain (float g, bool temporarily = false) { _gain = g; }
 
        int set_state (const XMLNode&, int version);
 
@@ -79,7 +82,8 @@ public:
        const std::string& origin() const { return _origin; }
 
        virtual void set_path (const std::string&);
-       
+       void replace_file (const std::string&);
+
        static PBD::Signal2<int,std::string,std::vector<std::string> > AmbiguousFileName;
 
        void existence_check ();
@@ -89,9 +93,9 @@ public:
         */
        int rename (const std::string& name);
 
-       virtual void release_descriptor () {}
+       virtual void close () = 0;
 
-protected:
+  protected:
        FileSource (Session& session, DataType type,
                    const std::string& path,
                    const std::string& origin,
@@ -110,6 +114,7 @@ protected:
        uint16_t    _channel;
        bool        _within_session;
        std::string _origin;
+       float       _gain;
 };
 
 } // namespace ARDOUR