diff options
Diffstat (limited to 'src/server/events')
-rw-r--r-- | src/server/events/CreateBlock.cpp | 4 | ||||
-rw-r--r-- | src/server/events/CreateGraph.cpp | 2 | ||||
-rw-r--r-- | src/server/events/CreatePort.cpp | 8 | ||||
-rw-r--r-- | src/server/events/Delta.cpp | 20 | ||||
-rw-r--r-- | src/server/events/Disconnect.cpp | 2 | ||||
-rw-r--r-- | src/server/events/SetPortValue.cpp | 4 |
6 files changed, 20 insertions, 20 deletions
diff --git a/src/server/events/CreateBlock.cpp b/src/server/events/CreateBlock.cpp index 63b05b58..8caa3bf6 100644 --- a/src/server/events/CreateBlock.cpp +++ b/src/server/events/CreateBlock.cpp @@ -65,7 +65,7 @@ CreateBlock::pre_process() std::string plugin_uri_str; const iterator t = _properties.find(uris.ingen_prototype); if (t != _properties.end() && t->second.type() == uris.forge.URI) { - plugin_uri_str = t->second.get_uri(); + plugin_uri_str = t->second.ptr<char>(); } else { return Event::pre_process_done(Status::BAD_REQUEST); } @@ -90,7 +90,7 @@ CreateBlock::pre_process() const bool polyphonic = ( p != _properties.end() && p->second.type() == _engine.world()->forge().Bool && - p->second.get_bool()); + p->second.get<int32_t>()); if (!(_block = plugin->instantiate(*_engine.buffer_factory(), Raul::Symbol(_path.symbol()), diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp index 8ab05a2e..0355b0bb 100644 --- a/src/server/events/CreateGraph.cpp +++ b/src/server/events/CreateGraph.cpp @@ -64,7 +64,7 @@ CreateGraph::pre_process() uint32_t int_poly = 1; iterator p = _properties.find(uris.ingen_polyphony); if (p != _properties.end() && p->second.type() == uris.forge.Int) { - int_poly = p->second.get_int32(); + int_poly = p->second.get<int32_t>(); } if (int_poly < 1 || int_poly > 128) { diff --git a/src/server/events/CreatePort.cpp b/src/server/events/CreatePort.cpp index 2e3e4d42..4687e44e 100644 --- a/src/server/events/CreatePort.cpp +++ b/src/server/events/CreatePort.cpp @@ -77,7 +77,7 @@ CreatePort::CreatePort(Engine& engine, const Range buffer_types = properties.equal_range(uris.atom_bufferType); for (Iterator i = buffer_types.first; i != buffer_types.second; ++i) { if (i->second.type() == _engine.world()->forge().URI) { - _buf_type = _engine.world()->uri_map().map_uri(i->second.get_uri()); + _buf_type = _engine.world()->uri_map().map_uri(i->second.ptr<char>()); } } } @@ -123,14 +123,14 @@ CreatePort::pre_process() std::make_pair(uris.lv2_index, _engine.world()->forge().make(old_n_ports))); } else if (index_i->second.type() != uris.forge.Int || - index_i->second.get_int32() != old_n_ports) { + index_i->second.get<int32_t>() != old_n_ports) { return Event::pre_process_done(Status::BAD_INDEX, _path); } const PropIter poly_i = _properties.find(uris.ingen_polyphonic); const bool polyphonic = (poly_i != _properties.end() && poly_i->second.type() == uris.forge.Bool && - poly_i->second.get_bool()); + poly_i->second.get<int32_t>()); if (!(_graph_port = _graph->create_port( *_engine.buffer_factory(), Raul::Symbol(_path.symbol()), @@ -155,7 +155,7 @@ CreatePort::pre_process() _ports_array = new Raul::Array<PortImpl*>(old_n_ports + 1, NULL); _update = _graph_port->properties(); - assert(_graph_port->index() == (uint32_t)index_i->second.get_int32()); + assert(_graph_port->index() == (uint32_t)index_i->second.get<int32_t>()); assert(_graph->num_ports_non_rt() == (uint32_t)old_n_ports + 1); assert(_graph_port->index() == (uint32_t)old_n_ports); assert(_ports_array->size() == _graph->num_ports_non_rt()); diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp index 2b851b16..28eccc71 100644 --- a/src/server/events/Delta.cpp +++ b/src/server/events/Delta.cpp @@ -207,19 +207,19 @@ Delta::pre_process() if (value.type() == uris.forge.Bool) { op = SpecialType::ENABLE; // FIXME: defer this until all other metadata has been processed - if (value.get_bool() && !_graph->enabled()) + if (value.get<int32_t>() && !_graph->enabled()) _compiled_graph = _graph->compile(); } else { _status = Status::BAD_VALUE_TYPE; } } else if (key == uris.ingen_polyphony) { if (value.type() == uris.forge.Int) { - if (value.get_int32() < 1 || value.get_int32() > 128) { + if (value.get<int32_t>() < 1 || value.get<int32_t>() > 128) { _status = Status::INVALID_POLY; } else { op = SpecialType::POLYPHONY; _graph->prepare_internal_poly( - *_engine.buffer_factory(), value.get_int32()); + *_engine.buffer_factory(), value.get<int32_t>()); } } else { _status = Status::BAD_VALUE_TYPE; @@ -233,8 +233,8 @@ Delta::pre_process() obj->set_property(key, value, value.context()); BlockImpl* block = dynamic_cast<BlockImpl*>(obj); if (block) - block->set_polyphonic(value.get_bool()); - if (value.get_bool()) { + block->set_polyphonic(value.get<int32_t>()); + if (value.get<int32_t>()) { obj->prepare_poly(*_engine.buffer_factory(), parent->internal_poly()); } else { obj->prepare_poly(*_engine.buffer_factory(), 1); @@ -248,7 +248,7 @@ Delta::pre_process() } } else if (is_client && key == uris.ingen_broadcast) { _engine.broadcaster()->set_broadcast( - _request_client->uri(), value.get_bool()); + _request_client->uri(), value.get<int32_t>()); } if (_status != Status::NOT_PREPARED) { @@ -293,11 +293,11 @@ Delta::execute(ProcessContext& context) switch (*t) { case SpecialType::ENABLE_BROADCAST: if (port) { - port->enable_monitoring(value.get_bool()); + port->enable_monitoring(value.get<int32_t>()); } break; case SpecialType::ENABLE: - if (value.get_bool()) { + if (value.get<int32_t>()) { if (_compiled_graph) { _graph->set_compiled_graph(_compiled_graph); } @@ -308,7 +308,7 @@ Delta::execute(ProcessContext& context) break; case SpecialType::POLYPHONIC: { GraphImpl* parent = reinterpret_cast<GraphImpl*>(object->parent()); - if (value.get_bool()) { + if (value.get<int32_t>()) { object->apply_poly( context, *_engine.maid(), parent->internal_poly_process()); } else { @@ -319,7 +319,7 @@ Delta::execute(ProcessContext& context) if (!_graph->apply_internal_poly(context, *_engine.buffer_factory(), *_engine.maid(), - value.get_int32())) { + value.get<int32_t>())) { _status = Status::INTERNAL_ERROR; } break; diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp index a7f31316..8f1c5032 100644 --- a/src/server/events/Disconnect.cpp +++ b/src/server/events/Disconnect.cpp @@ -97,7 +97,7 @@ Disconnect::Impl::Impl(Engine& e, const bool is_control = _dst_input_port->is_a(PortType::CONTROL) || _dst_input_port->is_a(PortType::CV); - const float value = is_control ? _dst_input_port->value().get_float() : 0; + const float value = is_control ? _dst_input_port->value().get<float>() : 0; for (uint32_t i = 0; i < _buffers->size(); ++i) { if (is_control) { Buffer* buf = _buffers->at(i).get(); diff --git a/src/server/events/SetPortValue.cpp b/src/server/events/SetPortValue.cpp index edef9e8c..0d68b1af 100644 --- a/src/server/events/SetPortValue.cpp +++ b/src/server/events/SetPortValue.cpp @@ -90,7 +90,7 @@ SetPortValue::apply(Context& context) if (buf->type() == uris.atom_Sound || buf->type() == uris.atom_Float) { if (_value.type() == uris.forge.Float) { - _port->set_control_value(context, _time, _value.get_float()); + _port->set_control_value(context, _time, _value.get<float>()); } else { _status = Status::TYPE_MISMATCH; } @@ -105,7 +105,7 @@ SetPortValue::apply(Context& context) _status = Status::NO_SPACE; } } else if (buf->type() == uris.atom_URID) { - ((LV2_Atom_URID*)buf->atom())->body = _value.get_int32(); + ((LV2_Atom_URID*)buf->atom())->body = _value.get<int32_t>(); } else { _status = Status::BAD_VALUE_TYPE; } |