summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-23 18:11:49 +0000
committerDavid Robillard <d@drobilla.net>2011-09-23 18:11:49 +0000
commit9a99f038176a7fadc59bbeaa3d3d57f16e4abb74 (patch)
treef3c1dbb555ff095c1ba7a296009924390e60db09 /src/client
parent650a13f7c18a4caf4387c0845b708e2c2bf1625d (diff)
downloadingen-9a99f038176a7fadc59bbeaa3d3d57f16e4abb74.tar.gz
ingen-9a99f038176a7fadc59bbeaa3d3d57f16e4abb74.tar.bz2
ingen-9a99f038176a7fadc59bbeaa3d3d57f16e4abb74.zip
Animate audio port colours based on levels.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3475 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientStore.cpp4
-rw-r--r--src/client/OSCClientReceiver.cpp7
2 files changed, 7 insertions, 4 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index d8f36302..6725d961 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -419,11 +419,11 @@ ClientStore::set_property(const URI& subject_uri, const URI& predicate, const At
}
void
-ClientStore::activity(const Path& path)
+ClientStore::activity(const Path& path, const Atom& value)
{
SharedPtr<PortModel> port = PtrCast<PortModel>(_object(path));
if (port)
- port->signal_activity().emit();
+ port->signal_activity().emit(value);
else
LOG(error) << "Activity for non-existent port " << path << endl;
}
diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp
index c163da60..e71d19d5 100644
--- a/src/client/OSCClientReceiver.cpp
+++ b/src/client/OSCClientReceiver.cpp
@@ -153,7 +153,8 @@ OSCClientReceiver::setup_callbacks()
lo_server_thread_add_method(_st, "/connect", "ss", connection_cb, this);
lo_server_thread_add_method(_st, "/disconnect", "ss", disconnection_cb, this);
lo_server_thread_add_method(_st, "/set_property", NULL, set_property_cb, this);
- lo_server_thread_add_method(_st, "/activity", "s", activity_cb, this);
+ lo_server_thread_add_method(_st, "/activity", "sT", activity_cb, this);
+ lo_server_thread_add_method(_st, "/activity", "sf", activity_cb, this);
}
/** Catches errors that aren't a direct result of a client request.
@@ -276,7 +277,9 @@ OSCClientReceiver::_activity_cb(const char* path, const char* types, lo_arg** ar
{
const char* const port_path = &argv[0]->s;
- _target->activity(port_path);
+ Atom value = AtomLiblo::lo_arg_to_atom(types[1], argv[1]);
+
+ _target->activity(port_path, value);
return 0;
}