shithub: sox

Download patch

ref: a2d5cf59274f3a5bc5011f9aa35fb99c5a04771c
parent: 363cd538c50cafcf738f58849b977a3f26c834ad
author: robs <robs>
date: Sun Apr 29 03:03:34 EDT 2007

Fix CDDA sector duration display for non-CDDA sample rates

--- a/src/sox.c
+++ b/src/sox.c
@@ -960,9 +960,10 @@
     if (f->desc->length && f->desc->signal.channels && f->desc->signal.rate) {
       sox_size_t ws = f->desc->length / f->desc->signal.channels;
       fprintf(stderr,
-        "Duration       : %s = %u samples = %g CDDA sectors\n",
+        "Duration       : %s = %u samples %c %g CDDA sectors\n",
         str_time((double)ws / f->desc->signal.rate),
-        ws, (double)ws / 588);
+        ws, "~="[f->desc->signal.rate == 44100],
+        (double)ws/ f->desc->signal.rate * 44100 / 588);
     }
     fprintf(stderr,
       "Endian Type    : %s\n"