diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2009-02-22 12:41:40 +1100 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2009-02-22 12:41:40 +1100 |
commit | 294cdd7f279daf961b179703148f8ce0a8a83409 (patch) | |
tree | ad0a139c9d27d4dec5ff7a3c423a779c8a27fa3e /programs | |
parent | 12180c5bb3fbfe5e32491f491e4d2c0ae795b9aa (diff) |
programs/sndfile-info.c : Remove dead code.
Diffstat (limited to 'programs')
-rw-r--r-- | programs/sndfile-info.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/programs/sndfile-info.c b/programs/sndfile-info.c index b5f23be..3ac12a8 100644 --- a/programs/sndfile-info.c +++ b/programs/sndfile-info.c @@ -247,29 +247,21 @@ info_dump (const char *filename) puts (strbuffer) ; printf ("----------------------------------------\n") ; - if (file == NULL) - { printf ("Error : Not able to open input file %s.\n", filename) ; - fflush (stdout) ; - memset (data, 0, sizeof (data)) ; - puts (sf_strerror (NULL)) ; - } - else - { printf ("Sample Rate : %d\n", sfinfo.samplerate) ; - printf ("Frames : %" PRId64 "\n", sfinfo.frames) ; - printf ("Channels : %d\n", sfinfo.channels) ; - printf ("Format : 0x%08X\n", sfinfo.format) ; - printf ("Sections : %d\n", sfinfo.sections) ; - printf ("Seekable : %s\n", (sfinfo.seekable ? "TRUE" : "FALSE")) ; - printf ("Duration : %s\n", generate_duration_str (&sfinfo)) ; - - if (sfinfo.frames < 100 * 1024 * 1024) - { /* Do not use sf_signal_max because it doesn't work for non-seekable files . */ - signal_max = get_signal_max (file) ; - decibels = calc_decibels (&sfinfo, signal_max) ; - printf ("Signal Max : %g (%4.2f dB)\n", signal_max, decibels) ; - } ; - putchar ('\n') ; + printf ("Sample Rate : %d\n", sfinfo.samplerate) ; + printf ("Frames : %" PRId64 "\n", sfinfo.frames) ; + printf ("Channels : %d\n", sfinfo.channels) ; + printf ("Format : 0x%08X\n", sfinfo.format) ; + printf ("Sections : %d\n", sfinfo.sections) ; + printf ("Seekable : %s\n", (sfinfo.seekable ? "TRUE" : "FALSE")) ; + printf ("Duration : %s\n", generate_duration_str (&sfinfo)) ; + + if (sfinfo.frames < 100 * 1024 * 1024) + { /* Do not use sf_signal_max because it doesn't work for non-seekable files . */ + signal_max = get_signal_max (file) ; + decibels = calc_decibels (&sfinfo, signal_max) ; + printf ("Signal Max : %g (%4.2f dB)\n", signal_max, decibels) ; } ; + putchar ('\n') ; sf_close (file) ; |