[paranoia] Complete Playlist-length

Daniel Migowski Mig-O at artis.uni-oldenburg.de
Sat Nov 20 03:20:11 PST 1999



Hi,

I altered the funcion display_toc in main.c, so that is displays the
whole length of the cd.
You like to add this functionality to CDParanoia 9.7 :o) ?

mfg
    Daniel Migowski

-------------------------------------------------------------

tatic void display_toc(cdrom_drive *d){
  int i;
  char buffer[256];
  long allsecs;
  report("\nTable of contents (audio tracks only):\n"
  "track        length               begin        copy pre ch\n"
  "===========================================================");

  for(i=1;i<=d->tracks;i++)
    if(cdda_track_audiop(d,i)){

      long sec=cdda_track_firstsector(d,i);
      long off=cdda_track_lastsector(d,i)-sec+1;

      sprintf(buffer,
       "%3d.  %7ld [%02d:%02d.%02d]  %7ld [%02d:%02d.%02d]  %s %s %s",
       i,
       off,(int)(off/(60*75)),(int)((off/75)%60),(int)(off%75),
       sec,(int)(sec/(60*75)),(int)((sec/75)%60),(int)(sec%75),
       cdda_track_copyp(d,i)?"  OK":"  no",
       cdda_track_preemp(d,i)?" yes":"  no",
       cdda_track_channels(d,i)==2?" 2":" 4");
      report(buffer);
    }
  report("");
  allsecs=cdda_track_lastsector(d,i-1)+1;
  sprintf(buffer,
      "Complete playtime is %02d:%02d.%02d",
      (int)(allsecs/(60*75)),(int)((allsecs/75)%60),(int)(allsecs%75));
  report(buffer);
}

--- >8 ----
List archives:  http://www.xiph.org/archives/
Paranoia homepage: http://www.xiph.org/paranoia/
To unsubscribe from this list, send a message to 'paranoia-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Paranoia mailing list