Mercurial > hg > svcore
comparison data/model/SparseTimeValueModel.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 |
---|---|
85 bool isOK() const override { return true; } | 85 bool isOK() const override { return true; } |
86 | 86 |
87 sv_frame_t getStartFrame() const override { | 87 sv_frame_t getStartFrame() const override { |
88 return m_events.getStartFrame(); | 88 return m_events.getStartFrame(); |
89 } | 89 } |
90 sv_frame_t getEndFrame() const override { | 90 sv_frame_t getTrueEndFrame() const override { |
91 if (m_events.isEmpty()) return 0; | 91 if (m_events.isEmpty()) return 0; |
92 sv_frame_t e = m_events.getEndFrame() + 1; | 92 sv_frame_t e = m_events.getEndFrame() + 1; |
93 if (e % m_resolution == 0) return e; | 93 if (e % m_resolution == 0) return e; |
94 else return (e / m_resolution + 1) * m_resolution; | 94 else return (e / m_resolution + 1) * m_resolution; |
95 } | 95 } |