diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-02-28 15:50:16 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-02-28 15:50:16 +0300 |
commit | 285fd4e367ca7383ab57fc81f9e84731a67825bb (patch) | |
tree | 9aec429c49110ab872bc2da4dfdb5ee06ab3dd71 /src/adlmidi_load.cpp | |
parent | 1f905ede543e7c59323875562a815ab8034a5c79 (diff) | |
download | libADLMIDI-285fd4e367ca7383ab57fc81f9e84731a67825bb.tar.gz libADLMIDI-285fd4e367ca7383ab57fc81f9e84731a67825bb.tar.bz2 libADLMIDI-285fd4e367ca7383ab57fc81f9e84731a67825bb.zip |
Fixed wrong very long inter-note delays on 32-bit platforms
Diffstat (limited to 'src/adlmidi_load.cpp')
-rw-r--r-- | src/adlmidi_load.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/adlmidi_load.cpp b/src/adlmidi_load.cpp index a39c191..b819819 100644 --- a/src/adlmidi_load.cpp +++ b/src/adlmidi_load.cpp @@ -381,9 +381,9 @@ InvFmt: TrackData.resize(TrackCount, std::vector<uint8_t>()); CurrentPosition.track.clear(); CurrentPosition.track.resize(TrackCount); - InvDeltaTicks = fraction<long>(1, 1000000l * static_cast<long>(DeltaTicks)); + InvDeltaTicks = fraction<uint64_t>(1, 1000000l * static_cast<uint64_t>(DeltaTicks)); //Tempo = 1000000l * InvDeltaTicks; - Tempo = fraction<long>(1, static_cast<long>(DeltaTicks)); + Tempo = fraction<uint64_t>(1, static_cast<uint64_t>(DeltaTicks)); static const unsigned char EndTag[4] = {0xFF, 0x2F, 0x00, 0x00}; int totalGotten = 0; @@ -478,7 +478,7 @@ InvFmt: uint64_t tkDelay = ReadVarLenEx(tk, ok); if(ok) - CurrentPosition.track[tk].delay = static_cast<long>(tkDelay); + CurrentPosition.track[tk].delay = tkDelay; else { std::stringstream msg; |