Mercurial > audlegacy-plugins
diff src/madplug/fileinfo.c @ 1162:29519d604e8c trunk
[svn] - revise bitrate calculation with xing header. if number of bytes and number of frames are available in xing header, fast play time calculation yields almost appropriate duration upon a vbr file.
- now fileinfo dialog shows duration in MM:SS format.
author | yaz |
---|---|
date | Mon, 04 Jun 2007 07:46:52 -0700 |
parents | 98a760301a4e |
children | aeea3e7b0060 |
line wrap: on
line diff
--- a/src/madplug/fileinfo.c Sun Jun 03 16:54:43 2007 -0700 +++ b/src/madplug/fileinfo.c Mon Jun 04 07:46:52 2007 -0700 @@ -643,8 +643,10 @@ gtk_label_set_text(GTK_LABEL(mpeg_frames), ""); } gtk_label_set_text(GTK_LABEL(mpeg_flags), mode_str[info.mode]); - snprintf(message, 127, "%ld seconds", - mad_timer_count(info.duration, MAD_UNITS_SECONDS)); + { + guint sec = mad_timer_count(info.duration, MAD_UNITS_SECONDS); + snprintf(message, 127, "%d:%02d (%d seconds)", sec /60 ,sec % 60, sec); + } gtk_label_set_text(GTK_LABEL(mpeg_duration), message); if (info.replaygain_album_str != NULL) {