13
0

lv2: plugins get an iterator to (sometimes|often) speed up ::get_grid() calls

This commit is contained in:
Paul Davis 2023-07-15 11:30:40 -06:00
parent ea2d2b4760
commit 2aa7dd42ea
2 changed files with 7 additions and 3 deletions

View File

@ -30,6 +30,8 @@
#include <vector>
#include <boost/enable_shared_from_this.hpp>
#include "temporal/tempo.h"
#include "ardour/plugin.h"
#include "ardour/plugin_scan_result.h"
#include "ardour/uri_map.h"
@ -389,6 +391,8 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
void do_remove_preset (std::string);
void find_presets ();
void add_state (XMLNode *) const;
Temporal::GridIterator grid_iterator;
};

View File

@ -2875,9 +2875,9 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
if (!got_grid) {
got_grid = true;
tmap->get_grid (tempo_map_points,
samples_to_superclock (start0, TEMPORAL_SAMPLE_RATE),
samples_to_superclock (end, TEMPORAL_SAMPLE_RATE), 0);
tmap->get_grid (grid_iterator, tempo_map_points,
samples_to_superclock (start0, TEMPORAL_SAMPLE_RATE),
samples_to_superclock (end, TEMPORAL_SAMPLE_RATE), 0);
}
}