summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/LV2Node.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-27 00:26:40 +0000
committerDavid Robillard <d@drobilla.net>2007-07-27 00:26:40 +0000
commit972a3e8476687951e8af4e9c1d4f25014dab1b82 (patch)
treeb20e1827a15a4309679fa68c7f8764e2381bde6b /src/libs/engine/LV2Node.cpp
parentf36e709b68144191d51959d6a2224cd9c3ad7871 (diff)
downloadingen-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/LV2Node.cpp')
-rw-r--r--src/libs/engine/LV2Node.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/libs/engine/LV2Node.cpp b/src/libs/engine/LV2Node.cpp
index 8c3ea933..8694b5e9 100644
--- a/src/libs/engine/LV2Node.cpp
+++ b/src/libs/engine/LV2Node.cpp
@@ -38,7 +38,7 @@ namespace Ingen {
*/
LV2Node::LV2Node(const Plugin* plugin,
const string& name,
- size_t poly,
+ uint32_t poly,
Patch* parent,
SampleRate srate,
size_t buffer_size)
@@ -61,16 +61,16 @@ LV2Node::LV2Node(const Plugin* plugin,
bool
LV2Node::instantiate()
{
- size_t num_ports = slv2_plugin_get_num_ports(_lv2_plugin);
+ uint32_t num_ports = slv2_plugin_get_num_ports(_lv2_plugin);
assert(num_ports > 0);
_ports = new Raul::Array<Port*>(num_ports);
_instances = new SLV2Instance[_poly];
- size_t port_buffer_size = 0;
+ uint32_t port_buffer_size = 0;
- for (size_t i=0; i < _poly; ++i) {
+ for (uint32_t i=0; i < _poly; ++i) {
_instances[i] = slv2_plugin_instantiate(_lv2_plugin, _srate, NULL);
if (_instances[i] == NULL) {
cerr << "Failed to instantiate plugin!" << endl;
@@ -83,7 +83,7 @@ LV2Node::instantiate()
Port* port = NULL;
- for (size_t j=0; j < num_ports; ++j) {
+ for (uint32_t j=0; j < num_ports; ++j) {
SLV2Port id = slv2_plugin_get_port_by_index(_lv2_plugin, j);
// LV2 shortnames are guaranteed to be unique, valid C identifiers
@@ -141,7 +141,7 @@ LV2Node::instantiate()
LV2Node::~LV2Node()
{
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
slv2_instance_free(_instances[i]);
delete[] _instances;
@@ -153,7 +153,7 @@ LV2Node::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 < num_ports(); ++j) {
Port* const port = _ports->at(j);
set_port_buffer(i, j, port->buffer(i));
@@ -176,7 +176,7 @@ LV2Node::deactivate()
{
NodeBase::deactivate();
- for (size_t i=0; i < _poly; ++i)
+ for (uint32_t i=0; i < _poly; ++i)
slv2_instance_deactivate(_instances[i]);
}
@@ -186,7 +186,7 @@ LV2Node::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)
slv2_instance_run(_instances[i], nframes);
NodeBase::post_process(nframes, start, end);
@@ -194,7 +194,7 @@ LV2Node::process(SampleCount nframes, FrameTime start, FrameTime end)
void
-LV2Node::set_port_buffer(size_t voice, size_t port_num, Buffer* buf)
+LV2Node::set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf)
{
assert(voice < _poly);