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/DSSINode.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/DSSINode.cpp')
-rw-r--r-- | src/libs/engine/DSSINode.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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<Sample>*)_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); |