diff options
author | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-07-02 19:46:17 +1000 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2014-07-02 19:47:37 +1000 |
commit | 77504d6abde21d73505d32359ea0e5693835fda3 (patch) | |
tree | 4dd4a6ed0a6fada361a7db840070445f83d32133 | |
parent | e4253e1609a7ab3f117427312c4d53a5bc7412c4 (diff) |
programs/sndfile-convert.c : Improve error message for GSM610.
Suggested-by: Jan Stary <hans@stare.cz>
-rw-r--r-- | programs/sndfile-convert.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/programs/sndfile-convert.c b/programs/sndfile-convert.c index 547d01c..28a30f6 100644 --- a/programs/sndfile-convert.c +++ b/programs/sndfile-convert.c @@ -113,11 +113,21 @@ report_format_error_exit (const char * argv0, SF_INFO * sfinfo) exit (1) ; } ; - printf ("\n" + if ((sfinfo->format & SF_FORMAT_SUBMASK) == SF_FORMAT_GSM610) + printf ("\n" "Error : output file format is invalid.\n" - "The '%s' container does not support '%s' codec data.\n" + "The '%s' container does not support '%s' data at %d Hz.\n" "Run '%s --help' for clues.\n\n", - sfe_container_name (sfinfo->format), sfe_codec_name (sfinfo->format), program_name (argv0)) ; + sfe_container_name (sfinfo->format), sfe_codec_name (sfinfo->format), + sfinfo->samplerate, program_name (argv0)) ; + else + printf ("\n" + "Error : output file format is invalid.\n" + "The '%s' container does not support '%s' data.\n" + "Run '%s --help' for clues.\n\n", + sfe_container_name (sfinfo->format), sfe_codec_name (sfinfo->format), + program_name (argv0)) ; + exit (1) ; } /* report_format_error_exit */ |