new automation state model, sort of working, but not really
[ardour.git] / libs / ardour / diskstream.cc
index b2d481077f227da9fa94451e7663d51a572dfcc5..9e83c5e21a1243edbb9c755b97c7ed6f74cb9c91 100644 (file)
@@ -32,6 +32,8 @@
 #include <sys/stat.h>
 #include <sys/mman.h>
 
+#include <sigc++/bind.h>
+
 #include <pbd/error.h>
 #include <pbd/basename.h>
 #include <glibmm/thread.h>
@@ -61,10 +63,8 @@ using namespace PBD;
  * default from configuration_vars.h).  0 is not a good value for
  * allocating buffer sizes..
  */
-jack_nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256;
+nframes_t Diskstream::disk_io_chunk_frames = 1024 * 256;
 
-sigc::signal<void,Diskstream*>    Diskstream::DiskstreamCreated;
-sigc::signal<void,list<Source*>*> Diskstream::DeleteSources;
 sigc::signal<void>                Diskstream::DiskOverrun;
 sigc::signal<void>                Diskstream::DiskUnderrun;
 
@@ -86,7 +86,6 @@ Diskstream::Diskstream (Session& sess, const XMLNode& node)
 void
 Diskstream::init (Flag f)
 {
-       _refcnt = 0;
        _flags = f;
        _io = 0;
        _alignment_style = ExistingMaterial;
@@ -168,7 +167,7 @@ Diskstream::non_realtime_set_speed ()
 
        if (_seek_required) {
                if (speed() != 1.0f || speed() != -1.0f) {
-                       seek ((jack_nframes_t) (_session.transport_frame() * (double) speed()), true);
+                       seek ((nframes_t) (_session.transport_frame() * (double) speed()), true);
                }
                else {
                        seek (_session.transport_frame(), true);
@@ -191,7 +190,7 @@ Diskstream::realtime_set_speed (double sp, bool global)
        
        if (new_speed != _actual_speed) {
                
-               jack_nframes_t required_wrap_size = (jack_nframes_t) floor (_session.get_block_size() * 
+               nframes_t required_wrap_size = (nframes_t) floor (_session.get_block_size() * 
                                                                            fabs (new_speed)) + 1;
                
                if (required_wrap_size > wrap_buffer_size) {
@@ -266,7 +265,7 @@ Diskstream::set_loop (Location *location)
        return 0;
 }
 
-jack_nframes_t
+nframes_t
 Diskstream::get_capture_start_frame (uint32_t n)
 {
        Glib::Mutex::Lock lm (capture_info_lock);
@@ -279,7 +278,7 @@ Diskstream::get_capture_start_frame (uint32_t n)
        }
 }
 
-jack_nframes_t
+nframes_t
 Diskstream::get_captured_frames (uint32_t n)
 {
        Glib::Mutex::Lock lm (capture_info_lock);
@@ -293,7 +292,7 @@ Diskstream::get_captured_frames (uint32_t n)
 }
 
 void
-Diskstream::set_roll_delay (jack_nframes_t nframes)
+Diskstream::set_roll_delay (nframes_t nframes)
 {
        _roll_delay = nframes;
 }
@@ -332,9 +331,8 @@ Diskstream::use_playlist (Playlist* playlist)
                        reset_write_sources (false);
                }
                
-               plstate_connection = _playlist->StateChanged.connect (mem_fun (*this, &Diskstream::playlist_changed));
                plmod_connection = _playlist->Modified.connect (mem_fun (*this, &Diskstream::playlist_modified));
-               plgone_connection = _playlist->GoingAway.connect (mem_fun (*this, &Diskstream::playlist_deleted));
+               plgone_connection = _playlist->GoingAway.connect (bind (mem_fun (*this, &Diskstream::playlist_deleted), _playlist));
        }
 
        if (!overwrite_queued) {