Total song time error

This forum is for reporting bugs in MediaMonkey for Windows 4. Note that version 4 is no longer actively maintained as it has been replaced by version 5.

Moderator: Gurus

Lowlander
Posts: 59516
Joined: Sat Sep 06, 2003 5:53 pm

Total song time error

Post by Lowlander »

MM has an error in the total song time it displays in the bottom of the program.

It has the same problem as I was experiencing here:
http://www.songs-db.com/forum/viewtopic.php?t=2071

It has to do with rounding. Please let me know which version is correct the tracklisting or statusbar time.
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

What exactly is the error?

Just to explain how it works - MM doesn't do any rounding, all lengths are truncated to the nearest lower second. For example if you have two tracks of the same length 3:07.789, they are shown as 3:07 in the tracklist, but their total length in the statusbar is 6:15 (not 6:14).

Jiri
Lowlander
Posts: 59516
Joined: Sat Sep 06, 2003 5:53 pm

Post by Lowlander »

That is the problem, MM uses no truncating for the statusbar time and does so for the tracklisting time. This leads to a total time that is higher than the sum of the tracklisting times.
TheRocket
Posts: 84
Joined: Sat Jan 17, 2004 4:42 pm
Location: Quebec, Canada

Rounding

Post by TheRocket »

Hi,

In fact, I don't think it is a bug:

When displaying a single song, it is not accurate to display numbers after the seconds..

And for a whole list, those numbers can add up quickly to some seconds, and those seconds will be used on a CD or when playing the whole list.

And it is easier to get the sum of the time in the database and do a final rounding than rouding every track and then add them up... And first option is way faster...

TheRocket
TheRocket
-- MMWBE 0.91 released! Get it here http://rocket.dyndns.info/mp3manager/mmwbe_v091.rar or see topic http://www.mediamonkey.com/forum/viewto ... 4005#34005 for more details!!!
Lowlander
Posts: 59516
Joined: Sat Sep 06, 2003 5:53 pm

Post by Lowlander »

I just think the numbers should be consistent. Either rounding in both or no rounding at all.

Anyway it doesn't bother me, it is just that while coding for MM I found out that these numbers don't add up.
jiri
Posts: 5433
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

I think it is correct as is. In fact the times are always rounded down to the nearest integer. Let's take my example above, 6:14 could be shown as the total time, but it would be 1.578 secs off the correct total length (which is 6:15.578). The original values of times (including milliseconds)are sumed, not the rounded ones.

Jiri
Post Reply