mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
MIDI: fix major error in computing delta times for SMFSource::append_event_samples()
timecnt_t constructor is: (distance, position); this code was not computing the distance between the new event and _last_ev_time_samples.
This commit is contained in:
parent
637e59a14f
commit
21a4501e47
1 changed files with 1 additions and 1 deletions
|
|
@ -575,7 +575,7 @@ SMFSource::append_event_samples (const WriterLock& lock,
|
|||
/* a distance measure that starts at @p _last_ev_time_samples (audio time) and
|
||||
extends for ev.time() (audio time)
|
||||
*/
|
||||
const timecnt_t delta_distance (timepos_t (ev.time()), timepos_t (_last_ev_time_samples));
|
||||
const timecnt_t delta_distance (timepos_t (ev.time() - _last_ev_time_samples), timepos_t (_last_ev_time_samples));
|
||||
const Temporal::Beats delta_time_beats = delta_distance.beats ();
|
||||
const uint32_t delta_time_ticks = delta_time_beats.to_ticks(ppqn());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue