I have a large mp3 file which is more than 360Mb in size.
When the getLengthInMilliseconds function is invoked on this file the result is a negative number.
This appears due to an integer overflow when calculating the difference between the endOffset and the startOffset. As the endOffset and the startOffset are integers the expression evaluates as an integer and overflows to be a negative number.
Perhaps a long should be used for the endOffset to cater for large mp3 files?
I have a large mp3 file which is more than 360Mb in size.
When the getLengthInMilliseconds function is invoked on this file the result is a negative number.
This appears due to an integer overflow when calculating the difference between the endOffset and the startOffset. As the endOffset and the startOffset are integers the expression evaluates as an integer and overflows to be a negative number.
Perhaps a long should be used for the endOffset to cater for large mp3 files?