summaryrefslogtreecommitdiffstats
path: root/src/server/ingen_lv2.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-14 22:48:58 +0000
committerDavid Robillard <d@drobilla.net>2012-08-14 22:48:58 +0000
commit68c2d72ba4e2208ff926461bb6faccfbadcf2a61 (patch)
treeebda7b74b59165a7732293aad53228952e0b9e72 /src/server/ingen_lv2.cpp
parent76b602f1f834cb2c255848c5ba887b3d7c47171a (diff)
downloadingen-68c2d72ba4e2208ff926461bb6faccfbadcf2a61.tar.gz
ingen-68c2d72ba4e2208ff926461bb6faccfbadcf2a61.tar.bz2
ingen-68c2d72ba4e2208ff926461bb6faccfbadcf2a61.zip
Don't look up system ports by path in the audio thread.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4697 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/ingen_lv2.cpp')
-rw-r--r--src/server/ingen_lv2.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp
index 4c9c7d85..1ad6ac72 100644
--- a/src/server/ingen_lv2.cpp
+++ b/src/server/ingen_lv2.cpp
@@ -209,25 +209,26 @@ public:
virtual void set_root_patch(PatchImpl* patch) { _root_patch = patch; }
virtual PatchImpl* root_patch() { return _root_patch; }
+ /** Unused since LV2 has no dynamic ports. */
+ EnginePort* port(const Raul::Path& path) { return NULL; }
+
+ /** Doesn't have to be real-time safe since LV2 has no dynamic ports. */
virtual void add_port(ProcessContext& context, EnginePort* port) {
- // Note this doesn't have to be realtime safe since there's no dynamic LV2 ports
assert(dynamic_cast<LV2Port*>(port));
assert(port->patch_port()->index() == _ports.size());
_ports.push_back((LV2Port*)port);
}
- virtual Raul::Deletable* remove_port(ProcessContext& context,
- const Raul::Path& path,
- EnginePort** port = NULL) {
- // Note this doesn't have to be realtime safe since there's no dynamic LV2 ports
+ /** Doesn't have to be real-time safe since LV2 has no dynamic ports. */
+ virtual Raul::Deletable* remove_port(ProcessContext& context,
+ EnginePort* port) {
for (Ports::iterator i = _ports.begin(); i != _ports.end(); ++i) {
- if ((*i)->patch_port()->path() == path) {
+ if (*i == port) {
_ports.erase(i);
return NULL;
}
}
- Raul::warn << "Unable to find port " << path << std::endl;
return NULL;
}