From f9f32cb5becef2d8b645e6de8654deaefcd7fa97 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 14 Sep 2017 23:07:07 -0400 Subject: [PATCH] added TempoMap::Changed signal --- nutemp/t.cc | 5 +++++ nutemp/t.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/nutemp/t.cc b/nutemp/t.cc index c8336ccde8..b39fb4f3da 100644 --- a/nutemp/t.cc +++ b/nutemp/t.cc @@ -498,6 +498,7 @@ TempoMap::rebuild (superclock_t limit) */ bool hit_dirty = false; + superclock_t first_dirty = 0; for (tmp = _points.begin(); tmp != _points.end(); ) { @@ -507,6 +508,7 @@ TempoMap::rebuild (superclock_t limit) continue; } hit_dirty = true; + first_dirty = tmp->sclock(); } TempoMapPoints::iterator next = tmp; @@ -567,6 +569,9 @@ TempoMap::rebuild (superclock_t limit) prev = tmp; tmp = next; } + + Changed (first_dirty, _points.back().sclock()); /* EMIT SIGNAL */ + cerr << "Rebuilt " << first_dirty << " .. " << _points.back().sclock() << endl; } bool diff --git a/nutemp/t.h b/nutemp/t.h index be54c136ba..b734dcead8 100644 --- a/nutemp/t.h +++ b/nutemp/t.h @@ -9,6 +9,8 @@ #include +#include "pbd/signals.h" + #include "evoral/Beats.hpp" #include "ardour/ardour.h" @@ -361,6 +363,8 @@ class LIBARDOUR_API TempoMap void dump (std::ostream&); void rebuild (superclock_t limit); + PBD::Signal2 Changed; + private: TempoMapPoints _points; framecnt_t _sample_rate; -- 2.30.2