summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-03-12 06:59:48 +0000
committerDavid Robillard <d@drobilla.net>2012-03-12 06:59:48 +0000
commit81e9fb3245bd461ebfee4cfa16d1792e48533f9e (patch)
treeeb1b30d79cba70dda9d832100dd7c14b08085b03 /src/server/events
parente9d9569271ee962c09ab66c6babed1ca5655a6c6 (diff)
downloadingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.gz
ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.tar.bz2
ingen-81e9fb3245bd461ebfee4cfa16d1792e48533f9e.zip
Centralise atom creation in forge object.
Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4054 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/CreatePort.cpp6
-rw-r--r--src/server/events/RegisterClient.cpp7
-rw-r--r--src/server/events/SetMetadata.cpp2
3 files changed, 9 insertions, 6 deletions
diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp
index 5080fb79..4f4753d3 100644
--- a/src/server/events/CreatePort.cpp
+++ b/src/server/events/CreatePort.cpp
@@ -111,7 +111,9 @@ CreatePort::pre_process()
Resource::Properties::const_iterator index_i = _properties.find(uris.lv2_index);
if (index_i == _properties.end()) {
- index_i = _properties.insert(make_pair(uris.lv2_index, (int)old_num_ports));
+ index_i = _properties.insert(
+ make_pair(uris.lv2_index,
+ _engine.world()->forge().make(int32_t(old_num_ports))));
} else if (index_i->second.type() != Atom::INT
|| index_i->second.get_int32() != static_cast<int32_t>(old_num_ports)) {
Event::pre_process();
@@ -127,7 +129,7 @@ CreatePort::pre_process()
_patch_port->properties().insert(_properties.begin(), _properties.end());
- assert(index_i->second == Atom((int)_patch_port->index()));
+ assert(index_i->second == _engine.world()->forge().make((int)_patch_port->index()));
if (_patch_port) {
diff --git a/src/server/events/RegisterClient.cpp b/src/server/events/RegisterClient.cpp
index c18afb72..d95cc19c 100644
--- a/src/server/events/RegisterClient.cpp
+++ b/src/server/events/RegisterClient.cpp
@@ -56,9 +56,10 @@ RegisterClient::post_process()
that to clients.
*/
const Ingen::Shared::URIs& uris = *_engine.world()->uris().get();
- _request_client->set_property(uris.ingen_engine,
- uris.ingen_sampleRate,
- int32_t(_engine.driver()->sample_rate()));
+ _request_client->set_property(
+ uris.ingen_engine,
+ uris.ingen_sampleRate,
+ _engine.world()->forge().make(int32_t(_engine.driver()->sample_rate())));
}
} // namespace Server
diff --git a/src/server/events/SetMetadata.cpp b/src/server/events/SetMetadata.cpp
index 68bd24d5..0603a150 100644
--- a/src/server/events/SetMetadata.cpp
+++ b/src/server/events/SetMetadata.cpp
@@ -230,7 +230,7 @@ SetMetadata::pre_process()
if (parent) {
if (value.type() == Atom::BOOL) {
op = POLYPHONIC;
- obj->set_property(key, value.get_bool(), value.context());
+ obj->set_property(key, value, value.context());
NodeImpl* node = dynamic_cast<NodeImpl*>(obj);
if (node)
node->set_polyphonic(value.get_bool());