summaryrefslogtreecommitdiffstats
path: root/src/engine/PatchImpl.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/PatchImpl.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/PatchImpl.hpp')
-rw-r--r--src/engine/PatchImpl.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/engine/PatchImpl.hpp b/src/engine/PatchImpl.hpp
index 54839e92..c051f76b 100644
--- a/src/engine/PatchImpl.hpp
+++ b/src/engine/PatchImpl.hpp
@@ -31,9 +31,10 @@ namespace Ingen {
namespace Shared { class Connection; }
+class CompiledPatch;
class ConnectionImpl;
+class Context;
class Engine;
-class CompiledPatch;
class ProcessContext;
@@ -53,17 +54,16 @@ public:
uint32_t poly,
PatchImpl* parent,
SampleRate srate,
- size_t buffer_size,
uint32_t local_poly);
virtual ~PatchImpl();
- void activate();
+ void activate(BufferFactory& bufs);
void deactivate();
void process(ProcessContext& context);
- void set_buffer_size(BufferFactory& bufs, size_t size);
+ void set_buffer_size(Context& context, BufferFactory& bufs, Shared::PortType type, size_t size);
/** Prepare for a new (internal) polyphony value.
*
@@ -79,7 +79,7 @@ public:
* \param poly Must be < the most recent value passed to prepare_internal_poly.
* \param maid Any objects no longer needed will be pushed to this
*/
- bool apply_internal_poly(Raul::Maid& maid, uint32_t poly);
+ bool apply_internal_poly(BufferFactory& bufs, Raul::Maid& maid, uint32_t poly);
// Patch specific stuff not inherited from Node
@@ -96,7 +96,7 @@ public:
uint32_t num_ports() const;
- PortImpl* create_port(BufferFactory& bufs, const std::string& name, Shared::PortType type, size_t buffer_size, bool is_output);
+ PortImpl* create_port(BufferFactory& bufs, const std::string& name, Shared::PortType type, size_t buffer_size, bool is_output, bool polyphonic);
void add_input(Raul::List<PortImpl*>::Node* port) { _input_ports.push_back(port); } ///< Preprocesser thread
void add_output(Raul::List<PortImpl*>::Node* port) { _output_ports.push_back(port); } ///< Preprocessor thread
Raul::List<PortImpl*>::Node* remove_port(const std::string& name);
@@ -121,7 +121,7 @@ public:
void enable() { _process = true; }
void disable();
- uint32_t internal_polyphony() const { return _internal_poly; }
+ uint32_t internal_poly() const { return _internal_poly; }
private:
inline void compile_recursive(NodeImpl* n, CompiledPatch* output) const;