fix up file renaming code a little bit
[ardour.git] / libs / ardour / ardour / source.h
index 16a762eb9459b884a53432b54fa5865c3d3bbf68..cb46e90085ad4abe4bf19225f6c35f9075034cd4 100644 (file)
@@ -60,6 +60,7 @@ class Source : public SessionObject
        time_t timestamp() const { return _timestamp; }
        void stamp (time_t when) { _timestamp = when; }
 
+       virtual bool       empty () const = 0;
        virtual framecnt_t length (framepos_t pos) const = 0;
        virtual void       update_length (framepos_t pos, framecnt_t cnt) = 0;
 
@@ -104,12 +105,8 @@ class Source : public SessionObject
        Glib::Mutex& mutex()       { return _lock; }
        Flag         flags() const { return _flags; }
 
-        void inc_use_count () { g_atomic_int_inc (&_use_count); }
-        void dec_use_count () { 
-                gint oldval = g_atomic_int_exchange_and_add (&_use_count, -1);
-                assert (oldval > 0);
-        }
-
+        virtual void inc_use_count ();
+        virtual void dec_use_count ();
         int  use_count() const { return g_atomic_int_get (&_use_count); }
         bool used() const { return use_count() > 0; }