From befd3deeee43c092c4dc54918f0f7cbab7814e24 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 11 Dec 2012 14:03:00 -0800 Subject: [PATCH] cmMidiFile.c Fixed absolute time calc. bug in cmMidiFileTickToSamples(). --- cmMidiFile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmMidiFile.c b/cmMidiFile.c index 43b3eef..b67c5bf 100644 --- a/cmMidiFile.c +++ b/cmMidiFile.c @@ -821,9 +821,10 @@ void cmMidiFileTickToSamples( cmMidiFileH_t h, double srate, bool absFl ) cmMidiTrackMsg_t* mp = p->msgV[mi]; unsigned delta = floor((mp->dtick*srate)/1000000.0); + absSmp += delta; + mp->dtick = absFl ? absSmp : delta; - absSmp += delta; } }