Patent ID: 7787976

Claim:
A method for estimating an audio length of an audio file, the audio file comprising N audio frames, N being a natural number, i being an integer index ranging from 1 to N, said method comprising the steps of: (1) before the audio file is played, calculating a predicted audio length L 0 and setting an initial adjustable audio length L A (0) equal to the predicted audio length L 0 ; and (2) when the ith audio frame of the audio file is played, performing the following sub-steps: (2a) calculating a reference audio length L R (i) of the ith audio frame; (2b) calculating a variation ratio R(i) of the ith audio frame according to L R (i) and L R (i−1), judging whether R(i) is smaller than a predetermined threshold; if YES, performing the sub-step (2c); if NO, performing the sub-step (2d); (2c) calculating an ith adjustable audio length L A (i) of the ith audio frame according to L R (i) and an (i−1)th adjustable audio length L A (i−1) of the (i−1)th audio frame in the audio file, performing the sub-step (2e); (2d) setting an adjustable length L A (i) of the ith audio frame equal to an (i−1)th adjustable audio length L A (i−1) of the (i−1)th audio frame in the audio file, and performing the sub-step (2e); (2e) calculating an estimated audio length L E (i) of the ith audio frame according to L A (i), L R (i), a cumulative played data amount S played (i), and a total data amount S total of the audio file; and (2f) saving the estimated audio length L E (i) of the ith audio frame.