summaryrefslogtreecommitdiff
path: root/libs/ardour/session_click.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-01-03 18:43:58 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-01-03 18:43:58 +0000
commit2a200bdc0ead3d2a2a0481db44b0bc080529aa69 (patch)
tree2dc854572ed60513668647c2416707c89c68c3ea /libs/ardour/session_click.cc
parent0d4658e0afb35329fe4ba135a20df92691f8b639 (diff)
return two iterators into the Bars|Beats list of the tempo map rather than making a copy; use iterators in the GUI
git-svn-id: svn://localhost/ardour2/branches/3.0@11146 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_click.cc')
-rw-r--r--libs/ardour/session_click.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/session_click.cc b/libs/ardour/session_click.cc
index 86a5d4ad78..083f8055f9 100644
--- a/libs/ardour/session_click.cc
+++ b/libs/ardour/session_click.cc
@@ -41,7 +41,8 @@ Pool Click::pool ("click", sizeof (Click), 128);
void
Session::click (framepos_t start, framecnt_t nframes)
{
- TempoMap::BBTPointList points;
+ TempoMap::BBTPointList::const_iterator points_begin;
+ TempoMap::BBTPointList::const_iterator points_end;
Sample *buf;
if (_click_io == 0) {
@@ -59,13 +60,13 @@ Session::click (framepos_t start, framecnt_t nframes)
BufferSet& bufs = get_scratch_buffers(ChanCount(DataType::AUDIO, 1));
buf = bufs.get_audio(0).data();
- _tempo_map->map (points, start, end);
+ _tempo_map->map (points_begin, points_end, start, end);
- if (points.empty()) {
+ if (distance (points_begin, points_end) == 0) {
goto run_clicks;
}
- for (TempoMap::BBTPointList::iterator i = points.begin(); i != points.end(); ++i) {
+ for (TempoMap::BBTPointList::const_iterator i = points_begin; i != points_end; ++i) {
switch ((*i).type) {
case TempoMap::Beat:
if (click_emphasis_data == 0 || (click_emphasis_data && (*i).beat != 1)) {