summaryrefslogtreecommitdiffstats
path: root/src/engine/LV2Node.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-02-23 03:46:44 +0000
committerDavid Robillard <d@drobilla.net>2010-02-23 03:46:44 +0000
commit3893203399c1b67fb70729558e51f014b863b307 (patch)
tree25ce8cd9847ecc3eec25396d7ae228f8e48af696 /src/engine/LV2Node.hpp
parent48eccb2983229c33df9d3858f34a73cb698a4e61 (diff)
downloadingen-3893203399c1b67fb70729558e51f014b863b307.tar.gz
ingen-3893203399c1b67fb70729558e51f014b863b307.tar.bz2
ingen-3893203399c1b67fb70729558e51f014b863b307.zip
Free plugin instances when decreasing polyphony.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2482 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/LV2Node.hpp')
-rw-r--r--src/engine/LV2Node.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/engine/LV2Node.hpp b/src/engine/LV2Node.hpp
index 57ad7998..4d751f32 100644
--- a/src/engine/LV2Node.hpp
+++ b/src/engine/LV2Node.hpp
@@ -61,9 +61,13 @@ public:
void set_port_buffer(uint32_t voice, uint32_t port_num, IntrusivePtr<Buffer> buf);
protected:
- LV2Plugin* _lv2_plugin;
- Raul::Array<SLV2Instance>* _instances;
- Raul::Array<SLV2Instance>* _prepared_instances;
+ inline SLV2Instance instance(uint32_t voice) { return (SLV2Instance)(*_instances)[voice].get(); }
+
+ typedef Raul::Array< SharedPtr<void> > Instances;
+
+ LV2Plugin* _lv2_plugin;
+ Instances* _instances;
+ Instances* _prepared_instances;
LV2MessageContext* _message_funcs;