diff options
author | Carl Hetherington <carl@carlh.net> | 2010-04-21 20:42:22 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-04-21 20:42:22 +0000 |
commit | 061a85191c301ac18f2e8ca59d43127a4499ba96 (patch) | |
tree | 469688f4dea1853c91372319a899b2efc71b30d5 /libs/ardour/session_butler.cc | |
parent | d9cebc2edf8accded23c6f2a1caab73eb47a50fd (diff) |
Move Diskstream ownership to Track, so that Session no longer holds lists of Diskstreams. Breaks 3.0 file format again.
git-svn-id: svn://localhost/ardour2/branches/3.0@6945 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_butler.cc')
-rw-r--r-- | libs/ardour/session_butler.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/libs/ardour/session_butler.cc b/libs/ardour/session_butler.cc index 156784875a..1aa061313d 100644 --- a/libs/ardour/session_butler.cc +++ b/libs/ardour/session_butler.cc @@ -40,6 +40,7 @@ #include "ardour/midi_diskstream.h" #include "ardour/session.h" #include "ardour/timestamps.h" +#include "ardour/track.h" #include "i18n.h" @@ -73,30 +74,33 @@ Session::schedule_curve_reallocation () } void -Session::request_overwrite_buffer (Diskstream* stream) +Session::request_overwrite_buffer (Track* t) { SessionEvent *ev = new SessionEvent (SessionEvent::Overwrite, SessionEvent::Add, SessionEvent::Immediate, 0, 0, 0.0); - ev->set_ptr (stream); + ev->set_ptr (t); queue_event (ev); } /** Process thread. */ void -Session::overwrite_some_buffers (Diskstream* ds) +Session::overwrite_some_buffers (Track* t) { if (actively_recording()) { return; } - if (ds) { + if (t) { - ds->set_pending_overwrite (true); + t->set_pending_overwrite (true); } else { - boost::shared_ptr<DiskstreamList> dsl = diskstreams.reader(); - for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) { - (*i)->set_pending_overwrite (true); + boost::shared_ptr<RouteList> rl = routes.reader(); + for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) { + boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i); + if (tr) { + tr->set_pending_overwrite (true); + } } } |