comparison data/model/NoteModel.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
100 bool isOK() const override { return true; } 100 bool isOK() const override { return true; }
101 101
102 sv_frame_t getStartFrame() const override { 102 sv_frame_t getStartFrame() const override {
103 return m_events.getStartFrame(); 103 return m_events.getStartFrame();
104 } 104 }
105 sv_frame_t getEndFrame() const override { 105 sv_frame_t getTrueEndFrame() const override {
106 if (m_events.isEmpty()) return 0; 106 if (m_events.isEmpty()) return 0;
107 sv_frame_t e = m_events.getEndFrame(); 107 sv_frame_t e = m_events.getEndFrame();
108 if (e % m_resolution == 0) return e; 108 if (e % m_resolution == 0) return e;
109 else return (e / m_resolution + 1) * m_resolution; 109 else return (e / m_resolution + 1) * m_resolution;
110 } 110 }