summaryrefslogtreecommitdiffstats
path: root/src/server/InputPort.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-08-28 18:14:02 +0000
committerDavid Robillard <d@drobilla.net>2014-08-28 18:14:02 +0000
commit704605973d7775fb3c80136490e316921947900f (patch)
tree9f0d5dd5136063ed428d87bf5ccce6567cafd9c1 /src/server/InputPort.hpp
parentb5195d8cf6a8ed5c446284f904e5704748915450 (diff)
downloadingen-704605973d7775fb3c80136490e316921947900f.tar.gz
ingen-704605973d7775fb3c80136490e316921947900f.tar.bz2
ingen-704605973d7775fb3c80136490e316921947900f.zip
Clean up code documentation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5454 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/InputPort.hpp')
-rw-r--r--src/server/InputPort.hpp25
1 files changed, 22 insertions, 3 deletions
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<Voice>* 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