# HG changeset patch # User Chris Cannam # Date 1526395840 -3600 # Node ID f6891128299316e9778f01ef5e2faec70fc8eae9 # Parent cee1be4fb8c1d0c03e5e3ff2b89c1804eba30026 Restore m_extendTo, which is needed for Tony diff -r cee1be4fb8c1 -r f68911282993 data/model/SparseModel.h --- a/data/model/SparseModel.h Tue May 15 11:03:49 2018 +0100 +++ b/data/model/SparseModel.h Tue May 15 15:50:40 2018 +0100 @@ -69,7 +69,13 @@ return m_resolution ? m_resolution : 1; } virtual void setResolution(int resolution); - + + // Extend the end of the model. If this is set to something beyond + // the end of the final point in the model, then getEndFrame() + // will return this value. Otherwise getEndFrame() will return the + // end of the final point. (This is used by the Tony application) + virtual void extendEndFrame(sv_frame_t to) { m_extendTo = to; } + typedef PointType Point; typedef std::multiset PointList; @@ -398,6 +404,7 @@ protected: sv_samplerate_t m_sampleRate; int m_resolution; + sv_frame_t m_extendTo; bool m_notifyOnAdd; sv_frame_t m_sinceLastNotifyMin; sv_frame_t m_sinceLastNotifyMax; @@ -543,6 +550,7 @@ bool notifyOnAdd) : m_sampleRate(sampleRate), m_resolution(resolution), + m_extendTo(0), m_notifyOnAdd(notifyOnAdd), m_sinceLastNotifyMin(-1), m_sinceLastNotifyMax(-1), @@ -574,7 +582,11 @@ PointListConstIterator i(m_points.end()); f = (--i)->frame + 1; } - return f; + if (m_extendTo > f) { + return m_extendTo; + } else { + return f; + } } template