first vaguely working version using PresentationInfo
[ardour.git] / libs / ardour / lv2_plugin.cc
index a5c87c8d6a8840651d56e27892481ad36c480b08..4c3ca31d2dca53d1e3263fcdde2adbc7babe1486 100644 (file)
@@ -634,6 +634,7 @@ LV2Plugin::init(const void* c_plugin, framecnt_t rate)
 
                _port_flags.push_back(flags);
                _port_minimumSize.push_back(minimumSize);
+               DEBUG_TRACE(DEBUG::LV2, string_compose("port %1 buffer %2 bytes\n", i, minimumSize));
        }
 
        _control_data = new float[num_ports];
@@ -1126,7 +1127,7 @@ LV2Plugin::add_state(XMLNode* root) const
 
        XMLNode*    child;
        char        buf[32];
-       LocaleGuard lg(X_("C"));
+       LocaleGuard lg;
 
        for (uint32_t i = 0; i < parameter_count(); ++i) {
                if (parameter_is_input(i) && parameter_is_control(i)) {
@@ -1799,13 +1800,13 @@ int
 LV2Plugin::set_state(const XMLNode& node, int version)
 {
        XMLNodeList          nodes;
-       const XMLProperty*   prop;
+       XMLProperty const * prop;
        XMLNodeConstIterator iter;
        XMLNode*             child;
        const char*          sym;
        const char*          value;
        uint32_t             port_id;
-       LocaleGuard          lg(X_("C"));
+       LocaleGuard          lg;
 
        if (node.name() != state_node_name()) {
                error << _("Bad node sent to LV2Plugin::set_state") << endmsg;
@@ -2309,7 +2310,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
                                        if (_session.transport_frame() != _next_cycle_start ||
                                            _session.transport_speed() != _next_cycle_speed) {
                                                // Transport has changed, write position at cycle start
-                                               tmap.bbt_time(_session.transport_frame(), bbt);
+                                               bbt = tmap.bbt_at_frame (_session.transport_frame());
                                                write_position(&_impl->forge, _ev_buffers[port_index],
                                                               tmetric, bbt, _session.transport_speed(),
                                                               _session.transport_frame(), 0);
@@ -2341,7 +2342,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
                                                ++m;
                                        } else {
                                                tmetric.set_metric(metric);
-                                               bbt = metric->start();
+                                               bbt = tmap.bbt_at_pulse (metric->pulse());
                                                write_position(&_impl->forge, _ev_buffers[port_index],
                                                               tmetric, bbt, _session.transport_speed(),
                                                               metric->frame(),