summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.cpp21
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.hpp8
-rw-r--r--src/libs/engine/events/SetPolyphonicEvent.cpp2
-rw-r--r--src/libs/engine/events/SetPolyphonyEvent.cpp2
4 files changed, 24 insertions, 9 deletions
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp
index 23a3ac7b..733a6a82 100644
--- a/src/libs/engine/events/RequestMetadataEvent.cpp
+++ b/src/libs/engine/events/RequestMetadataEvent.cpp
@@ -28,11 +28,17 @@ using std::string;
namespace Ingen {
-RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key)
-: QueuedEvent(engine, responder, timestamp),
- _path(node_path),
- _key(key),
- _object(NULL)
+RequestMetadataEvent::RequestMetadataEvent(Engine& engine,
+ SharedPtr<Responder> responder,
+ SampleCount timestamp,
+ bool property,
+ const string& node_path,
+ const string& key)
+ : QueuedEvent(engine, responder, timestamp)
+ , _path(node_path)
+ , _property(property)
+ , _key(key)
+ , _object(NULL)
{
}
@@ -48,7 +54,10 @@ RequestMetadataEvent::pre_process()
}
}
- _value = _object->get_variable(_key);
+ if (_property)
+ _value = _object->get_property(_key);
+ else
+ _value = _object->get_variable(_key);
QueuedEvent::pre_process();
}
diff --git a/src/libs/engine/events/RequestMetadataEvent.hpp b/src/libs/engine/events/RequestMetadataEvent.hpp
index 71f55399..f6a18dfc 100644
--- a/src/libs/engine/events/RequestMetadataEvent.hpp
+++ b/src/libs/engine/events/RequestMetadataEvent.hpp
@@ -38,13 +38,19 @@ namespace Shared {
class RequestMetadataEvent : public QueuedEvent
{
public:
- RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key);
+ RequestMetadataEvent(Engine& engine,
+ SharedPtr<Responder> responder,
+ SampleCount timestamp,
+ bool property,
+ const string& path,
+ const string& key);
void pre_process();
void post_process();
private:
string _path;
+ bool _property;
string _key;
Raul::Atom _value;
GraphObjectImpl* _object;
diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp
index bce65ba9..9b7fd980 100644
--- a/src/libs/engine/events/SetPolyphonicEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonicEvent.cpp
@@ -68,7 +68,7 @@ SetPolyphonicEvent::post_process()
if (_object) {
if (_success) {
_responder->respond_ok();
- _engine.broadcaster()->send_polyphonic(_path, _poly);
+ _engine.broadcaster()->send_property_change(_path, "ingen:polyphonic", _poly);
} else {
_responder->respond_error("Unable to set object as polyphonic");
}
diff --git a/src/libs/engine/events/SetPolyphonyEvent.cpp b/src/libs/engine/events/SetPolyphonyEvent.cpp
index 17222330..eb6550cb 100644
--- a/src/libs/engine/events/SetPolyphonyEvent.cpp
+++ b/src/libs/engine/events/SetPolyphonyEvent.cpp
@@ -68,7 +68,7 @@ SetPolyphonyEvent::post_process()
{
if (_patch) {
_responder->respond_ok();
- _engine.broadcaster()->send_patch_polyphony(_patch_path, _poly);
+ _engine.broadcaster()->send_property_change(_patch_path, "ingen:polyphony", (int32_t)_poly);
} else {
_responder->respond_error("Unable to find patch");
}