summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events/EnablePortBroadcastingEvent.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-30 23:36:39 +0000
committerDavid Robillard <d@drobilla.net>2007-09-30 23:36:39 +0000
commit8450921d5309c5ba677997e7ca722a466c8dc222 (patch)
tree2c0fdf58f142be8f42222c3a580614cfbf0d7989 /src/libs/engine/events/EnablePortBroadcastingEvent.cpp
parentffc6f457d61460ca73bb24a3d7e583f90d54ecd2 (diff)
downloadingen-8450921d5309c5ba677997e7ca722a466c8dc222.tar.gz
ingen-8450921d5309c5ba677997e7ca722a466c8dc222.tar.bz2
ingen-8450921d5309c5ba677997e7ca722a466c8dc222.zip
Working port notification for LV2 GUIs (ll-plugins VU meter works in Ingen now).
git-svn-id: http://svn.drobilla.net/lad/ingen@790 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/EnablePortBroadcastingEvent.cpp')
-rw-r--r--src/libs/engine/events/EnablePortBroadcastingEvent.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/libs/engine/events/EnablePortBroadcastingEvent.cpp b/src/libs/engine/events/EnablePortBroadcastingEvent.cpp
index e432a884..27603e86 100644
--- a/src/libs/engine/events/EnablePortBroadcastingEvent.cpp
+++ b/src/libs/engine/events/EnablePortBroadcastingEvent.cpp
@@ -33,10 +33,12 @@ namespace Ingen {
EnablePortBroadcastingEvent::EnablePortBroadcastingEvent(Engine& engine,
SharedPtr<Responder> responder,
SampleCount timestamp,
- const std::string& port_path)
+ const std::string& port_path,
+ bool enable)
: QueuedEvent(engine, responder, timestamp),
_port_path(port_path),
- _port(NULL)
+ _port(NULL),
+ _enable(enable)
{
}
@@ -55,31 +57,18 @@ EnablePortBroadcastingEvent::execute(ProcessContext& context)
{
QueuedEvent::execute(context);
-#if 0
- assert(_time >= start && _time <= end);
-
- if (_port != NULL && _port->type() == DataType::FLOAT)
- _value = ((AudioBuffer*)_port->buffer(0))->value_at(0/*_time - start*/);
- else
- _port = NULL; // triggers error response
-#endif
+ if (_port)
+ _port->monitor(_enable);
}
void
EnablePortBroadcastingEvent::post_process()
{
-#if 0
- string msg;
- if (!_port) {
- _responder->respond_error("Unable to find port for get_value responder.");
- } else if (_responder->client()) {
+ if (_port)
_responder->respond_ok();
- _responder->client()->control_change(_port_path, _value);
- } else {
- _responder->respond_error("Unable to find client to send port value");
- }
-#endif
+ else
+ _responder->respond_error("Unable to find port for get_value responder.");
}