Skip to content

Commit

Permalink
SOP: Workaround for NULL basic tempo
Browse files Browse the repository at this point in the history
  • Loading branch information
binarymaster committed Feb 27, 2017
1 parent 884a2e4 commit 36b7fbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2441,7 +2441,10 @@ function TMainForm.ReadSOP(var F: TMemoryStream): Boolean;
SongData_PutInt('SOP_BeatPerMeasure', B);
F.ReadBuffer(B, 1);
SongData_PutInt('SOP_BasicTempo', B);
SongData_PutDWord('InitTempo', 60000000 div B);
if B = 0 then
SongData_PutDWord('InitTempo', 60000000 div 120)
else
SongData_PutDWord('InitTempo', 60000000 div B);
F.ReadBuffer(fname, SizeOf(fname));
fname[Length(fname) - 1] := #0;
SongData_PutStr('SOP_Comment', PAnsiChar(@fname[0]));
Expand Down

0 comments on commit 36b7fbc

Please sign in to comment.