To elaborate on Max' answer and because I like statistics:

On Mon, 30 Jul 2012 00:58:46 +0800 zw g <pekingmas...@gmail.com> wrote:
> Now in the current MPD version:
> >From asking MPD by using `client.playlistinfo()` request by using
> python-mpd2,
> what i get is int type represents duration of each song in *seconds*
> form.
> 
> I think that is not accurate enough for computing the duration of
> whole playlist, especially for large playlist.

Yes, seconds is enough accuracy. Especially for large playlists!
If the playlist is two songs of 1 minute each, that makes 120 seconds
in total. When both lengths are inaccurate by 1 second (maximum!), that
means 120 +- 2 seconds, that is an error of less then 2%. Quite good
already.
If the playlist is large like 300 songs of 3 minutes each, that makes
900 minutes material or 54000 seconds. The error is 1 second per
song. So the length of a song is 180+-1 second or less then half a
percent per song. For this large amounts of songs, doing the
error-calculation by adding the larges values is giving an overly large
error, the real error will be much smaller, probably less the 0.1%. And
who needs a playlist-length of 54000 seconds accurate to less 0.1 percent?

Arnold

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to