summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/internal_return.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-02-20 00:55:52 +0000
committerCarl Hetherington <carl@carlh.net>2011-02-20 00:55:52 +0000
commit8f0750cc7e2a9c9d7c7a8c75a6df332c465a5292 (patch)
tree965efe70a7adc6378a7920586c6a1502daec57be /libs/ardour/ardour/internal_return.h
parent13232d03f3e5f8a5d7d19392c26c27ce0327250c (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/ardour/internal_return.h')
-rw-r--r--libs/ardour/ardour/internal_return.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h
index 41d09b2805..17688b892f 100644
--- a/libs/ardour/ardour/internal_return.h
+++ b/libs/ardour/ardour/internal_return.h
@@ -27,12 +27,14 @@
namespace ARDOUR {
+class InternalSend;
+
class InternalReturn : public Return
{
public:
InternalReturn (Session&);
-XMLNode& state(bool full);
+ XMLNode& state(bool full);
XMLNode& get_state(void);
int set_state(const XMLNode&, int version);
@@ -41,14 +43,16 @@ XMLNode& state(bool full);
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
int set_block_size (pframes_t);
- BufferSet* get_buffers();
- void release_buffers();
-
+ void add_send (InternalSend *);
+ void remove_send (InternalSend *);
+
static PBD::Signal1<void, pframes_t> CycleStart;
private:
BufferSet buffers;
- gint user_count; /* atomic */
+ /** sends that we are receiving data from */
+ std::list<InternalSend*> _sends;
+
void allocate_buffers (pframes_t);
void cycle_start (pframes_t);
};