introduce the notion that note additions and property changes can cause the removal...
[ardour.git] / libs / ardour / ardour / audio_diskstream.h
index 0a8a7a0a8eb6e1b00a848840b7b04109a798ea16..54ddbea14a516dc6419e57273b1d3156c0390d03 100644 (file)
@@ -28,6 +28,8 @@
 
 #include <time.h>
 
+#include <boost/utility.hpp>
+
 #include "pbd/fastlog.h"
 #include "pbd/ringbufferNPT.h"
 #include "pbd/stateful.h"
@@ -179,9 +181,12 @@ class AudioDiskstream : public Diskstream
 
   private:
 
-       struct ChannelInfo {
+       struct ChannelInfo : public boost::noncopyable {
 
-               ChannelInfo (nframes_t buffer_size, nframes_t speed_buffer_size, nframes_t wrap_buffer_size);
+               ChannelInfo (nframes_t playback_buffer_size, 
+                             nframes_t capture_buffer_size,
+                             nframes_t speed_buffer_size, 
+                             nframes_t wrap_buffer_size);
                ~ChannelInfo ();
 
                Sample     *playback_wrap_buffer;
@@ -211,6 +216,9 @@ class AudioDiskstream : public Diskstream
                RingBufferNPT<CaptureTransition> * capture_transition_buf;
                // the following are used in the butler thread only
                nframes_t                     curr_capture_cnt;
+
+                void resize_playback (nframes_t);
+                void resize_capture (nframes_t);
        };
 
        typedef std::vector<ChannelInfo*> ChannelList;
@@ -228,7 +236,7 @@ class AudioDiskstream : public Diskstream
                        ChannelInfo* channel_info, int channel, bool reversed);
 
        void finish_capture (bool rec_monitors_input, boost::shared_ptr<ChannelList>);
-       void transport_stopped (struct tm&, time_t, bool abort);
+       void transport_stopped_wallclock (struct tm&, time_t, bool abort);
        void transport_looped (nframes_t transport_frame);
 
        void init ();
@@ -250,6 +258,9 @@ class AudioDiskstream : public Diskstream
        void setup_destructive_playlist ();
        void use_destructive_playlist ();
 
+        void adjust_playback_buffering ();
+        void adjust_capture_buffering ();
+
        void engage_record_enable ();
        void disengage_record_enable ();