From 972a3e8476687951e8af4e9c1d4f25014dab1b82 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Jul 2007 00:26:40 +0000 Subject: 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 --- src/libs/engine/DSSINode.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/libs/engine/DSSINode.cpp') diff --git a/src/libs/engine/DSSINode.cpp b/src/libs/engine/DSSINode.cpp index 69aff132..a72c59db 100644 --- a/src/libs/engine/DSSINode.cpp +++ b/src/libs/engine/DSSINode.cpp @@ -29,7 +29,7 @@ using namespace std; namespace Ingen { -DSSINode::DSSINode(const Plugin* plugin, const string& name, size_t poly, Patch* parent, DSSI_Descriptor* descriptor, SampleRate srate, size_t buffer_size) +DSSINode::DSSINode(const Plugin* plugin, const string& name, uint32_t poly, Patch* parent, DSSI_Descriptor* descriptor, SampleRate srate, size_t buffer_size) : LADSPANode(plugin, name, 1, parent, descriptor->LADSPA_Plugin, srate, buffer_size), _dssi_descriptor(descriptor), _ui_addr(NULL), @@ -107,11 +107,12 @@ DSSINode::set_ui_url(const string& url) void -DSSINode::set_control(size_t port_num, Sample val) +DSSINode::set_control(uint32_t port_num, Sample val) { assert(port_num < _descriptor->PortCount); - cerr << "FIXME: set_control\n"; - //((TypedPort*)_ports->at(port_num))->set_value(val, 0); + Port* port = _ports->at(port_num); + assert(port->type() == DataType::FLOAT); + ((AudioBuffer*)port->buffer(0))->set(val, 0); } @@ -195,7 +196,7 @@ DSSINode::process(SampleCount nframes, FrameTime start, FrameTime end) void -DSSINode::set_port_buffer(size_t voice, size_t port_num, Buffer* buf) +DSSINode::set_port_buffer(uint32_t voice, uint32_t port_num, Buffer* buf) { assert(voice < _poly); -- cgit v1.2.1