From 14004b75a6d18a74fa59ac06c203af693164b774 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 9 Jun 2010 17:24:07 +0000 Subject: dynamic playback & capture buffer resizing (though transport is stopped first) git-svn-id: svn://localhost/ardour2/branches/3.0@7250 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_butler.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'libs/ardour/session_butler.cc') diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc index 7cbbd194ae..c92c0604c7 100644 --- a/libs/ardour/session_butler.cc +++ b/libs/ardour/session_butler.cc @@ -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 () { -- cgit v1.2.3