Changeset 4844:47f0daf6b214 in roaraudio


Ignore:
Timestamp:
04/05/11 00:27:40 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Fixed time display of roarvorbis if file has unknown playback length

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4843 r4844  
    1111        * Added VIOs and DSTR elements: null:, zero:, nrandom: 
    1212        * Added support for HTTP Basic Auth 
     13        * Fixed time display of roarvorbis if file has unknown playback length 
    1314 
    1415v. 0.4beta4 - Sun Mar 20 2011 12:15 CET 
  • roarclients/roarvorbis.c

    r4754 r4844  
    264264 
    265265 time2str(time_cur, time_buf[0], sizeof(time_buf[0])); 
    266  time2str(time_total-time_cur, time_buf[1], sizeof(time_buf[1])); 
    267  time2str(time_total, time_buf[2], sizeof(time_buf[2])); 
    268  
    269  //Time: 00:02.53 [03:26.20] of 03:28.73  (122.7 kbps)  Output Buffer  43.8% 
    270  fprintf(stderr, "\rTime: %s [%s] of %s  (%.1f kbps)            ", time_buf[0], time_buf[1], time_buf[2], bitrate); 
     266 
     267 if ( time_total > 0 ) { 
     268  time2str(time_total-time_cur, time_buf[1], sizeof(time_buf[1])); 
     269  time2str(time_total, time_buf[2], sizeof(time_buf[2])); 
     270 
     271  //Time: 00:02.53 [03:26.20] of 03:28.73  (122.7 kbps)  Output Buffer  43.8% 
     272  fprintf(stderr, "\rTime: %s [%s] of %s  (%.1f kbps)            ", time_buf[0], time_buf[1], time_buf[2], bitrate); 
     273 } else { 
     274  fprintf(stderr, "\rTime: %s  (%.1f kbps)                       ", time_buf[0], bitrate); 
     275 } 
     276 
    271277 fflush(stderr); 
    272278} 
Note: See TracChangeset for help on using the changeset viewer.