From 36f1e2ea3d2c7d20d8fa267a3a66438044e99e8e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 18 Jun 2006 19:26:53 +0000 Subject: 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 --- src/libs/engine/MidiNoteNode.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/libs/engine/MidiNoteNode.cpp') 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(_num_ports); + _ports = new Array(5); _midi_in_port = new InputPort(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)"); } -- cgit v1.2.1