summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/MidiNoteNode.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-06-18 19:26:53 +0000
committerDavid Robillard <d@drobilla.net>2006-06-18 19:26:53 +0000
commit36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e (patch)
tree963d5a6d87204fda9d8b1cd91f8810a6582bb41f /src/libs/engine/MidiNoteNode.cpp
parent00c8938a79d9e24547420d2a39421bcb7d8cc165 (diff)
downloadingen-36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e.tar.gz
ingen-36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e.tar.bz2
ingen-36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e.zip
Reworked use of Plugin class in engine slightly (more RAII-ey)
git-svn-id: http://svn.drobilla.net/lad/grauph@56 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/MidiNoteNode.cpp')
-rw-r--r--src/libs/engine/MidiNoteNode.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libs/engine/MidiNoteNode.cpp b/src/libs/engine/MidiNoteNode.cpp
index 4c0280bd..a2a95039 100644
--- a/src/libs/engine/MidiNoteNode.cpp
+++ b/src/libs/engine/MidiNoteNode.cpp
@@ -35,12 +35,11 @@ namespace Om {
MidiNoteNode::MidiNoteNode(const string& path, size_t poly, Patch* parent, samplerate srate, size_t buffer_size)
-: InternalNode(path, poly, parent, srate, buffer_size),
+: InternalNode(new Plugin(Plugin::Internal, "Om:NoteNode"), path, poly, parent, srate, buffer_size),
_voices(new Voice[poly]),
_sustain(false)
{
- _num_ports = 5;
- _ports = new Array<Port*>(_num_ports);
+ _ports = new Array<Port*>(5);
_midi_in_port = new InputPort<MidiMessage>(this, "DataType::MIDI In", 0, 1, DataType::MIDI, _buffer_size);
_ports->at(0) = _midi_in_port;
@@ -61,7 +60,6 @@ MidiNoteNode::MidiNoteNode(const string& path, size_t poly, Patch* parent, sampl
// new PortInfo("Trigger", AUDIO, OUTPUT, 0, 0, 1), _buffer_size);
_ports->at(4) = _trig_port;
- _plugin.type(Plugin::Internal);
_plugin.plug_label("note_in");
_plugin.name("Om Note Node (MIDI, OSC)");
}