Could someone tell me why the following code is outputting 0 at the marked line?
0
It seems as if everything is correct but then when I try to get the re
You are performing integer math.
Math between two integers will produce an integer. And the result will be rounded towards zero.
This line:
totalLengthSecs / totalFrames;
Is likely producing a result that's between 0 and 1. And getting rounded to 0
1