diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-20 00:55:52 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-20 00:55:52 +0000 |
commit | 8f0750cc7e2a9c9d7c7a8c75a6df332c465a5292 (patch) | |
tree | 965efe70a7adc6378a7920586c6a1502daec57be /libs/ardour/route.cc | |
parent | 13232d03f3e5f8a5d7d19392c26c27ce0327250c (diff) |
Make InternalReturns collect their sends' data on the return's ::run(), rather than sends merging data with the InternalReturn on their ::run(). This makes internal send/return thread-safe so that N routes can send to 1 whilst they are being run in parallel process threads.
git-svn-id: svn://localhost/ardour2/branches/3.0@8904 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 56fc090576..cb2f231def 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -2465,8 +2465,8 @@ Route::add_internal_return () } } -BufferSet* -Route::get_return_buffer () const +void +Route::add_send_to_internal_return (InternalSend* send) { Glib::RWLock::ReaderLock rm (_processor_lock); @@ -2474,16 +2474,13 @@ Route::get_return_buffer () const boost::shared_ptr<InternalReturn> d = boost::dynamic_pointer_cast<InternalReturn>(*x); if (d) { - BufferSet* bs = d->get_buffers (); - return bs; + return d->add_send (send); } } - - return 0; } void -Route::release_return_buffer () const +Route::remove_send_from_internal_return (InternalSend* send) { Glib::RWLock::ReaderLock rm (_processor_lock); @@ -2491,7 +2488,7 @@ Route::release_return_buffer () const boost::shared_ptr<InternalReturn> d = boost::dynamic_pointer_cast<InternalReturn>(*x); if (d) { - return d->release_buffers (); + return d->remove_send (send); } } } |