From 704605973d7775fb3c80136490e316921947900f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 Aug 2014 18:14:02 +0000 Subject: Clean up code documentation. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5454 a436a847-0d15-0410-975c-d299462d15a1 --- src/server/InputPort.hpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/server/InputPort.hpp') diff --git a/src/server/InputPort.hpp b/src/server/InputPort.hpp index da0d9327..12d28b04 100644 --- a/src/server/InputPort.hpp +++ b/src/server/InputPort.hpp @@ -69,18 +69,37 @@ public: /** Return the maximum polyphony of an output connected to this input. */ virtual uint32_t max_tail_poly(Context& context) const; - void add_arc(ProcessContext& context, ArcImpl* c); + bool apply_poly(ProcessContext& context, Raul::Maid& maid, uint32_t poly); + + /** Add an arc. Realtime safe. + * + * The buffer of this port will be set directly to the arc's buffer + * if there is only one arc, since no copying/mixing needs to take place. + * + * setup_buffers() must be called later for the change to take effect. + */ + void add_arc(ProcessContext& context, ArcImpl* c); + + /** Remove an arc. Realtime safe. + * + * setup_buffers() must be called later for the change to take effect. + */ ArcImpl* remove_arc(ProcessContext& context, const OutputPort* tail); - bool apply_poly(ProcessContext& context, Raul::Maid& maid, uint32_t poly); - + /** Set `voices` as the buffers to be used for this port. + * + * @return true iff buffers are locally owned by the port + */ bool get_buffers(BufferFactory& bufs, Raul::Array* voices, uint32_t poly, bool real_time) const; + /** Prepare buffer for access, mixing if necessary. */ void pre_process(Context& context); + + /** Prepare buffer for next process cycle. */ void post_process(Context& context); size_t num_arcs() const { return _num_arcs; } ///< Pre-process thread -- cgit v1.2.1