permit different sizes for audio playback & capture buffers
[ardour.git] / libs / ardour / ardour / source.h
index 62aca9136514f5369671f1c0c06f8e3557bb79bc..bf92e5a6e47bc2855e7d71137438068b957699a6 100644 (file)
 #include <set>
 
 #include <boost/utility.hpp>
-#include <sigc++/signal.h>
 #include "pbd/statefuldestructible.h"
 
 #include "ardour/ardour.h"
 #include "ardour/session_object.h"
 #include "ardour/data_type.h"
-#include "ardour/readable.h"
 
 namespace ARDOUR {
 
 class Session;
 
-class Source : public SessionObject, public boost::noncopyable
+class Source : public SessionObject
 {
   public:
        enum Flag {
@@ -60,12 +58,12 @@ class Source : public SessionObject, public boost::noncopyable
        time_t timestamp() const { return _timestamp; }
        void stamp (time_t when) { _timestamp = when; }
 
-       virtual sframes_t length (sframes_t pos) const = 0;
-       virtual void      update_length (sframes_t pos, sframes_t cnt) = 0;
+       virtual framecnt_t length (framepos_t pos) const = 0;
+       virtual void       update_length (framepos_t pos, framecnt_t cnt) = 0;
 
        virtual const Glib::ustring& path() const = 0;
 
-       virtual nframes64_t natural_position() const { return 0; }
+       virtual framepos_t natural_position() const { return 0; }
 
        void mark_for_remove();
 
@@ -82,18 +80,15 @@ class Source : public SessionObject, public boost::noncopyable
        virtual bool set_destructive (bool /*yn*/) { return false; }
        virtual bool length_mutable() const    { return false; }
 
-       void use ()    { _in_use++; }
-       void disuse () { if (_in_use) { _in_use--; } }
-
-       static sigc::signal<void,Source*>             SourceCreated;
-       sigc::signal<void,boost::shared_ptr<Source> > Switched;
+       static PBD::Signal1<void,Source*>             SourceCreated;
+       PBD::Signal1<void,boost::shared_ptr<Source> > Switched;
 
        bool has_been_analysed() const;
        virtual bool can_be_analysed() const { return false; }
        virtual void set_been_analysed (bool yn);
        virtual bool check_for_analysis_data_on_disk();
 
-       sigc::signal<void> AnalysisChanged;
+       PBD::Signal0<void> AnalysisChanged;
 
        AnalysisFeatureList transients;
        std::string get_transients_path() const;
@@ -118,7 +113,6 @@ class Source : public SessionObject, public boost::noncopyable
        Glib::Mutex         _playlist_lock;
 
   private:
-       uint32_t _in_use;
        void fix_writable_flags ();
 };