diff options
author | David Robillard <d@drobilla.net> | 2007-07-27 00:26:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-27 00:26:40 +0000 |
commit | 972a3e8476687951e8af4e9c1d4f25014dab1b82 (patch) | |
tree | b20e1827a15a4309679fa68c7f8764e2381bde6b /src/libs/engine/LADSPANode.cpp | |
parent | f36e709b68144191d51959d6a2224cd9c3ad7871 (diff) | |
download | ingen-972a3e8476687951e8af4e9c1d4f25014dab1b82.tar.gz ingen-972a3e8476687951e8af4e9c1d4f25014dab1b82.tar.bz2 ingen-972a3e8476687951e8af4e9c1d4f25014dab1b82.zip |
Use uint32_t for num_ports (and poly), matches LV2 and size_t is excessive on 64-bit.
Remove (linear) sorted assertion from Table, except in unit tests.
git-svn-id: http://svn.drobilla.net/lad/ingen@643 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/LADSPANode.cpp')
-rw-r--r-- | src/libs/engine/LADSPANode.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp index b5451ac3..feb72b9d 100644 --- a/src/libs/engine/LADSPANode.cpp +++ b/src/libs/engine/LADSPANode.cpp @@ -33,7 +33,7 @@ namespace Ingen { * Object is not usable until instantiate() is called with success. * (It _will_ crash!) */ -LADSPANode::LADSPANode(const Plugin* plugin, const string& path, size_t poly, Patch* parent, const LADSPA_Descriptor* descriptor, SampleRate srate, size_t buffer_size) +LADSPANode::LADSPANode(const Plugin* plugin, const string& path, uint32_t poly, Patch* parent, const LADSPA_Descriptor* descriptor, SampleRate srate, size_t buffer_size) : NodeBase(plugin, path, poly, parent, srate, buffer_size), _descriptor(descriptor), _instances(NULL) @@ -61,7 +61,7 @@ LADSPANode::instantiate() size_t port_buffer_size = 0; - for (size_t i=0; i < _poly; ++i) { + for (uint32_t i=0; i < _poly; ++i) { _instances[i] = _descriptor->instantiate(_descriptor, _srate); if (_instances[i] == NULL) { cerr << "Failed to instantiate plugin!" << endl; @@ -134,7 +134,7 @@ LADSPANode::instantiate() // Set default value if (port->buffer_size() == 1) { - for (size_t i=0; i < _poly; ++i) + for (uint32_t i=0; i < _poly; ++i) ((AudioBuffer*)port->buffer(i))->set(default_val, 0); } @@ -150,7 +150,7 @@ LADSPANode::instantiate() LADSPANode::~LADSPANode() { - for (size_t i=0; i < _poly; ++i) + for (uint32_t i=0; i < _poly; ++i) _descriptor->cleanup(_instances[i]); delete[] _instances; @@ -162,7 +162,7 @@ LADSPANode::activate() { NodeBase::activate(); - for (size_t i=0; i < _poly; ++i) { + for (uint32_t i=0; i < _poly; ++i) { for (unsigned long j=0; j < _descriptor->PortCount; ++j) { set_port_buffer(i, j, _ports->at(j)->buffer(i)); /* if (port->type() == DataType::FLOAT && port->buffer_size() == 1) @@ -181,7 +181,7 @@ LADSPANode::deactivate() { NodeBase::deactivate(); - for (size_t i=0; i < _poly; ++i) + for (uint32_t i=0; i < _poly; ++i) if (_descriptor->deactivate != NULL) _descriptor->deactivate(_instances[i]); } @@ -192,7 +192,7 @@ LADSPANode::process(SampleCount nframes, FrameTime start, FrameTime end) { NodeBase::pre_process(nframes, start, end); - for (size_t i=0; i < _poly; ++i) + for (uint32_t i=0; i < _poly; ++i) _descriptor->run(_instances[i], nframes); NodeBase::post_process(nframes, start, end); @@ -200,7 +200,7 @@ LADSPANode::process(SampleCount nframes, FrameTime start, FrameTime end) void -LADSPANode::set_port_buffer(size_t voice, size_t port_num, Buffer* buf) +LADSPANode::set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf) { assert(voice < _poly); |