Handle overlaps better when executing DiffCommands.
[ardour.git] / libs / ardour / session_butler.cc
index 1aa061313d00fe4e72c3668c3b96c7a8ebbc79e9..c92c0604c7d5af9adbc43229ff378402aa3bd5aa 100644 (file)
@@ -66,6 +66,36 @@ static inline uint32_t next_power_of_two (uint32_t n)
  BUTLER THREAD
  ---------------------------------------------------------------------------*/
 
+void
+Session::adjust_playback_buffering ()
+{
+        request_stop (false, false);
+       SessionEvent *ev = new SessionEvent (SessionEvent::AdjustPlaybackBuffering, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0);
+       queue_event (ev);
+}
+
+void
+Session::adjust_capture_buffering ()
+{
+        request_stop (false, false);
+       SessionEvent *ev = new SessionEvent (SessionEvent::AdjustCaptureBuffering, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0);
+       queue_event (ev);
+}
+
+void
+Session::schedule_playback_buffering_adjustment ()
+{
+       add_post_transport_work (PostTransportAdjustPlaybackBuffering);
+       _butler->schedule_transport_work ();
+}
+
+void
+Session::schedule_capture_buffering_adjustment ()
+{
+       add_post_transport_work (PostTransportAdjustCaptureBuffering);
+       _butler->schedule_transport_work ();
+}
+
 void
 Session::schedule_curve_reallocation ()
 {
@@ -119,28 +149,3 @@ Session::capture_load ()
 {
        return (uint32_t) g_atomic_int_get (&_capture_load);
 }
-
-uint32_t
-Session::playback_load_min ()
-{
-       return (uint32_t) g_atomic_int_get (&_playback_load_min);
-}
-
-uint32_t
-Session::capture_load_min ()
-{
-       return (uint32_t) g_atomic_int_get (&_capture_load_min);
-}
-
-void
-Session::reset_capture_load_min ()
-{
-       g_atomic_int_set (&_capture_load_min, 100);
-}
-
-void
-Session::reset_playback_load_min ()
-{
-       g_atomic_int_set (&_playback_load_min, 100);
-}
-