summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-11-22 23:31:46 +0000
committerDavid Robillard <d@drobilla.net>2008-11-22 23:31:46 +0000
commit9845c8616439e9c284b9d82b9ed17296dacaaa4e (patch)
treedbdc41c05d74c8b8c031fa040a4f9c98d8e66f97 /src/engine
parentfb87e81926cc0487b5f0e165806a7cc95053635e (diff)
downloadingen-9845c8616439e9c284b9d82b9ed17296dacaaa4e.tar.gz
ingen-9845c8616439e9c284b9d82b9ed17296dacaaa4e.tar.bz2
ingen-9845c8616439e9c284b9d82b9ed17296dacaaa4e.zip
Minor cleanup.
Don't initialize buffers twice on port creation (speed up node creation a bit). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1773 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/LV2Node.cpp9
-rw-r--r--src/engine/PatchImpl.cpp2
-rw-r--r--src/engine/PortImpl.cpp1
3 files changed, 5 insertions, 7 deletions
diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp
index 4e0f7416..96118e00 100644
--- a/src/engine/LV2Node.cpp
+++ b/src/engine/LV2Node.cpp
@@ -186,9 +186,8 @@ LV2Node::instantiate()
for (uint32_t j=0; j < num_ports; ++j) {
SLV2Port id = slv2_plugin_get_port_by_index(plug, j);
- // LV2 shortnames are guaranteed to be unique, valid C identifiers
+ // LV2 port symbols are guaranteed to be unique, valid C identifiers
port_name = slv2_value_as_string(slv2_port_get_symbol(plug, id));
-
assert(port_name.find("/") == string::npos);
port_path = path() + "/" + port_name;
@@ -221,8 +220,8 @@ LV2Node::instantiate()
}
// FIXME: need nice type preserving SLV2Value -> Raul::Atom conversion
- float def = isnan(def_values[j]) ? 0.0f : def_values[j];
- Atom defatm = def;
+ const float def = isnan(def_values[j]) ? 0.0f : def_values[j];
+ const Atom defatm = def;
if (direction == INPUT)
port = new InputPort(this, port_name, j, _polyphony, data_type, defatm, port_buffer_size);
@@ -253,7 +252,7 @@ LV2Node::instantiate()
_ports->at(j) = port;
}
- delete [] def_values;
+ delete[] def_values;
return true;
}
diff --git a/src/engine/PatchImpl.cpp b/src/engine/PatchImpl.cpp
index 9f0ae701..b7de5103 100644
--- a/src/engine/PatchImpl.cpp
+++ b/src/engine/PatchImpl.cpp
@@ -439,7 +439,7 @@ PatchImpl::compile() const
{
assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS);
- //cerr << "*********** Building process order for " << path() << endl;
+ //cerr << "*********** Compiling " << path() << endl;
CompiledPatch* const compiled_patch = new CompiledPatch();//_nodes.size());
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index 1a1fd9c0..b8c77f43 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -57,7 +57,6 @@ PortImpl::PortImpl(NodeImpl* const node,
assert(_poly > 0);
allocate_buffers();
- clear_buffers();
if (node->parent() == NULL)
_polyphonic = false;