summaryrefslogtreecommitdiffstats
path: root/src/engine/NodeImpl.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-20 21:52:36 +0000
committerDavid Robillard <d@drobilla.net>2010-02-20 21:52:36 +0000
commit46e5de590817756b21a7a5d99bd4963df343f455 (patch)
tree7d7b3b63297b24d84e5b42cc8aeb22d4212738b5 /src/engine/NodeImpl.hpp
parentb96a4015ae39b5bdd9afbd82898c0168a0a8e613 (diff)
downloadingen-46e5de590817756b21a7a5d99bd4963df343f455.tar.gz
ingen-46e5de590817756b21a7a5d99bd4963df343f455.tar.bz2
ingen-46e5de590817756b21a7a5d99bd4963df343f455.zip
Heavy overhaul of buffer management and polyphony.
* Working polyphony when nodes are instantiated at desired polyphony level (dynamic still doesn't work) * Use shared silent buffer for disconnected audio inputs (save memory) * Eliminate redundant patch compiling on delete and disconnect-all events that have child events * Fix a ton of crash bugs and other issues I've since forgotten git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2468 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/NodeImpl.hpp')
-rw-r--r--src/engine/NodeImpl.hpp30
1 files changed, 8 insertions, 22 deletions
diff --git a/src/engine/NodeImpl.hpp b/src/engine/NodeImpl.hpp
index ef7c3400..05b51b83 100644
--- a/src/engine/NodeImpl.hpp
+++ b/src/engine/NodeImpl.hpp
@@ -31,6 +31,7 @@ namespace Shared { class Plugin; class Node; class Port; }
class Buffer;
class BufferFactory;
+class Context;
class MessageContext;
class PatchImpl;
class PluginImpl;
@@ -52,8 +53,8 @@ class ProcessContext;
class NodeImpl : public GraphObjectImpl, virtual public Ingen::Shared::Node
{
public:
- NodeImpl(GraphObjectImpl* parent, const Raul::Symbol& symbol, bool poly)
- : GraphObjectImpl(parent, symbol, poly)
+ NodeImpl(GraphObjectImpl* parent, const Raul::Symbol& symbol)
+ : GraphObjectImpl(parent, symbol)
{}
/** Activate this Node.
@@ -62,25 +63,9 @@ public:
* inserted in to a patch. Any non-realtime actions that need to be
* done before the Node is ready for use should be done here.
*/
- virtual void activate() = 0;
- virtual void deactivate() = 0;
- virtual bool activated() = 0;
-
- /** Prepare for a new (external) polyphony value.
- *
- * Preprocessor thread, poly is actually applied by apply_poly.
- * \return true on success.
- */
- virtual bool prepare_poly(BufferFactory& bufs, uint32_t poly) = 0;
-
- /** Apply a new (external) polyphony value.
- *
- * Audio thread.
- *
- * \param poly Must be < the most recent value passed to prepare_poly.
- * \param maid Any objects no longer needed will be pushed to this
- */
- virtual bool apply_poly(Raul::Maid& maid, uint32_t poly) = 0;
+ virtual void activate(BufferFactory& bufs) = 0;
+ virtual void deactivate() = 0;
+ virtual bool activated() = 0;
/** Parallelism: Reset flags for start of a new cycle.
*/
@@ -169,7 +154,8 @@ public:
*/
virtual const Shared::Plugin* plugin() const = 0;
- virtual void set_buffer_size(BufferFactory& bufs, size_t size) = 0;
+ virtual void set_buffer_size(Context& context, BufferFactory& bufs,
+ Shared::PortType type, size_t size) = 0;
};