cmMidiFile.c Fixed absolute time calc. bug in cmMidiFileTickToSamples().

This commit is contained in:
kevin 2012-12-11 14:03:00 -08:00
parent 698f987558
commit befd3deeee

View File

@ -821,9 +821,10 @@ void cmMidiFileTickToSamples( cmMidiFileH_t h, double srate, bool absFl )
cmMidiTrackMsg_t* mp = p->msgV[mi]; cmMidiTrackMsg_t* mp = p->msgV[mi];
unsigned delta = floor((mp->dtick*srate)/1000000.0); unsigned delta = floor((mp->dtick*srate)/1000000.0);
absSmp += delta;
mp->dtick = absFl ? absSmp : delta; mp->dtick = absFl ? absSmp : delta;
absSmp += delta;
} }
} }