double _last_ev_time_beats;
sframes_t _last_ev_time_frames;
+ /** end time (start + duration) of last call to read_unlocked */
mutable sframes_t _smf_last_read_end;
+ /** time (in SMF ticks, 1 tick per _ppqn) of the last event read by read_unlocked */
+ mutable sframes_t _smf_last_read_time;
};
}; /* namespace ARDOUR */
, _last_ev_time_beats(0.0)
, _last_ev_time_frames(0)
, _smf_last_read_end (0)
+ , _smf_last_read_time (0)
{
if (init(_path, false)) {
throw failed_constructor ();
, _last_ev_time_beats(0.0)
, _last_ev_time_frames(0)
, _smf_last_read_end (0)
+ , _smf_last_read_time (0)
{
if (set_state(node, Stateful::loading_state_version)) {
throw failed_constructor ();
}
time += ev_delta_t; // accumulate delta time
}
+ } else {
+ time = _smf_last_read_time;
}
_smf_last_read_end = start + duration;
}
time += ev_delta_t; // accumulate delta time
+ _smf_last_read_time = time;
if (ret == 0) { // meta-event (skipped, just accumulate time)
continue;