diff options
author | David Robillard <d@drobilla.net> | 2011-09-23 18:11:49 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-09-23 18:11:49 +0000 |
commit | 9a99f038176a7fadc59bbeaa3d3d57f16e4abb74 (patch) | |
tree | f3c1dbb555ff095c1ba7a296009924390e60db09 /src/server/HTTPClientSender.cpp | |
parent | 650a13f7c18a4caf4387c0845b708e2c2bf1625d (diff) | |
download | ingen-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/server/HTTPClientSender.cpp')
-rw-r--r-- | src/server/HTTPClientSender.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/server/HTTPClientSender.cpp b/src/server/HTTPClientSender.cpp index a71701eb..990b28e5 100644 --- a/src/server/HTTPClientSender.cpp +++ b/src/server/HTTPClientSender.cpp @@ -124,12 +124,22 @@ HTTPClientSender::set_property(const URI& subject, const URI& key, const Atom& v } void -HTTPClientSender::activity(const Path& path) +HTTPClientSender::activity(const Path& path, const Raul::Atom& value) { - const string msg = string( + if (value.type() == Atom::BOOL) { + const string msg = string( "@prefix ingen: <http://drobilla.net/ns/ingen#> .\n\n<").append( - path.str()).append("> ingen:activity true .\n"); - send_chunk(msg); + path.str()).append("> ingen:activity true .\n"); + send_chunk(msg); + } else if (value.type() == Atom::FLOAT) { + const string msg = string( + "@prefix ingen: <http://drobilla.net/ns/ingen#> .\n\n<").append( + path.str()).append("> ingen:activity ").append( + value.get_bool() ? "true" : "false").append(" .\n"); + send_chunk(msg); + } else { + warn << "Unknown activity type at " << path << endl; + } } void |