mirror of
https://github.com/thestk/stk
synced 2026-02-07 09:46:16 +00:00
Bug fix in MidiFileIn.cpp for timing with time-code formats.
This commit is contained in:
@@ -79,7 +79,8 @@ MidiFileIn :: MidiFileIn( std::string fileName )
|
|||||||
usingTimeCode_ = false;
|
usingTimeCode_ = false;
|
||||||
if ( *data & 0x8000 ) {
|
if ( *data & 0x8000 ) {
|
||||||
// Determine ticks per second from time-code formats.
|
// Determine ticks per second from time-code formats.
|
||||||
tickrate = (double) -(*data & 0x7F00);
|
signed char tmp = -(*data & 0xFF00)>>8;
|
||||||
|
tickrate = (double) tmp;
|
||||||
// If frames per second value is 29, it really should be 29.97.
|
// If frames per second value is 29, it really should be 29.97.
|
||||||
if ( tickrate == 29.0 ) tickrate = 29.97;
|
if ( tickrate == 29.0 ) tickrate = 29.97;
|
||||||
tickrate *= (*data & 0x00FF);
|
tickrate *= (*data & 0x00FF);
|
||||||
|
|||||||
Reference in New Issue
Block a user