X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsession_butler.cc;h=262444c4358cab5fd7b8eec23787df64240d4687;hb=3a776b58ceadbf7c7d9a1ab4f691f18e3306316a;hp=3e7c2226ccb4d9c56b5cbf9e78e742b365f98291;hpb=b550a6e85bdb43e342f4955f4e16ffbc47fb06cb;p=ardour.git diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc index 3e7c2226cc..262444c435 100644 --- a/libs/ardour/session_butler.cc +++ b/libs/ardour/session_butler.cc @@ -28,26 +28,12 @@ #include "ardour/track.h" #include "ardour/types.h" -#include "i18n.h" +#include "pbd/i18n.h" using namespace std; using namespace ARDOUR; using namespace PBD; -/* XXX put this in the right place */ - -static inline uint32_t next_power_of_two (uint32_t n) -{ - --n; - n |= n >> 16; - n |= n >> 8; - n |= n >> 4; - n |= n >> 2; - n |= n >> 1; - ++n; - return n; -} - /*--------------------------------------------------------------------------- BUTLER THREAD ---------------------------------------------------------------------------*/ @@ -90,10 +76,15 @@ Session::schedule_curve_reallocation () } void -Session::request_overwrite_buffer (Track* t) +Session::request_overwrite_buffer (boost::shared_ptr r) { + boost::shared_ptr t = boost::dynamic_pointer_cast (r); + if (!t) { + return; + } + SessionEvent *ev = new SessionEvent (SessionEvent::Overwrite, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0); - ev->set_ptr (t); + ev->set_ptr (t.get()); queue_event (ev); }