mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
lv2: plugins get an iterator to (sometimes|often) speed up ::get_grid() calls
This commit is contained in:
parent
ea2d2b4760
commit
2aa7dd42ea
2 changed files with 7 additions and 3 deletions
|
|
@ -30,6 +30,8 @@
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/enable_shared_from_this.hpp>
|
#include <boost/enable_shared_from_this.hpp>
|
||||||
|
|
||||||
|
#include "temporal/tempo.h"
|
||||||
|
|
||||||
#include "ardour/plugin.h"
|
#include "ardour/plugin.h"
|
||||||
#include "ardour/plugin_scan_result.h"
|
#include "ardour/plugin_scan_result.h"
|
||||||
#include "ardour/uri_map.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 do_remove_preset (std::string);
|
||||||
void find_presets ();
|
void find_presets ();
|
||||||
void add_state (XMLNode *) const;
|
void add_state (XMLNode *) const;
|
||||||
|
|
||||||
|
Temporal::GridIterator grid_iterator;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2875,7 +2875,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
|
||||||
|
|
||||||
if (!got_grid) {
|
if (!got_grid) {
|
||||||
got_grid = true;
|
got_grid = true;
|
||||||
tmap->get_grid (tempo_map_points,
|
tmap->get_grid (grid_iterator, tempo_map_points,
|
||||||
samples_to_superclock (start0, TEMPORAL_SAMPLE_RATE),
|
samples_to_superclock (start0, TEMPORAL_SAMPLE_RATE),
|
||||||
samples_to_superclock (end, TEMPORAL_SAMPLE_RATE), 0);
|
samples_to_superclock (end, TEMPORAL_SAMPLE_RATE), 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue