examples/utils.c: also print duration in seconds
authorPaul Brossier <piem@piem.org>
Sun, 8 Dec 2013 16:49:02 +0000 (11:49 -0500)
committerPaul Brossier <piem@piem.org>
Sun, 8 Dec 2013 16:49:02 +0000 (11:49 -0500)
examples/utils.c

index f5c1d55..96862af 100644 (file)
@@ -163,7 +163,8 @@ examples_common_process (aubio_process_func_t process_func,
       total_read += read;
     } while (read == hop_size);
 
       total_read += read;
     } while (read == hop_size);
 
-    verbmsg ("read %d samples (%d blocks of %d) from %s at %dHz\n",
+    verbmsg ("read %.2fs (%d samples in %d blocks of %d) from %s at %dHz\n",
+        total_read * 1. / samplerate,
         total_read, blocks, hop_size, source_uri, samplerate);
 
     del_aubio_source (this_source);
         total_read, blocks, hop_size, source_uri, samplerate);
 
     del_aubio_source (this_source);