Mercurial > hg > svcore
comparison data/model/SparseOneDimensionalModel.h @ 1725:78fe29adfd16
Re-implement extendEndFrame behaviour, used by Tony application
author | Chris Cannam |
---|---|
date | Wed, 19 Jun 2019 13:32:52 +0100 |
parents | 73077ec5aed6 |
children | 9d82b164f264 |
comparison
equal
deleted
inserted
replaced
1724:157c62ff0056 | 1725:78fe29adfd16 |
---|---|
65 bool isOK() const override { return true; } | 65 bool isOK() const override { return true; } |
66 | 66 |
67 sv_frame_t getStartFrame() const override { | 67 sv_frame_t getStartFrame() const override { |
68 return m_events.getStartFrame(); | 68 return m_events.getStartFrame(); |
69 } | 69 } |
70 sv_frame_t getEndFrame() const override { | 70 sv_frame_t getTrueEndFrame() const override { |
71 if (m_events.isEmpty()) return 0; | 71 if (m_events.isEmpty()) return 0; |
72 sv_frame_t e = m_events.getEndFrame() + 1; | 72 sv_frame_t e = m_events.getEndFrame() + 1; |
73 if (e % m_resolution == 0) return e; | 73 if (e % m_resolution == 0) return e; |
74 else return (e / m_resolution + 1) * m_resolution; | 74 else return (e / m_resolution + 1) * m_resolution; |
75 } | 75 } |