shithub: libsamplerate

Download patch

ref: ed804732ff7e164114bd0be8f5777edd38a73035
parent: f507877b8c013ad2b5cfc8cde9f6fb05847931ae
author: Erik de Castro Lopo <erikd@mega-nerd.com>
date: Sat Apr 26 10:34:04 EDT 2008

examples/sndfile-resample.c : Add printing of libsndfile version, modify libsamplerate version.

--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
     * Win32/libsamplerate-0.def
     Add src_int_to_float/float_to_int_array to exports.
 
+    * examples/sndfile-resample.c
+    Add printing of libsndfile version, modify libsamplerate version.
+
 2008-03-23  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * doc/*.html
--- a/examples/sndfile-resample.c
+++ b/examples/sndfile-resample.c
@@ -264,7 +264,8 @@
 
 static void
 usage_exit (const char *progname)
-{	const char	*cptr ;
+{	char lsf_ver [128] ;
+	const char	*cptr ;
 	int		k ;
 
 	if ((cptr = strrchr (progname, '/')) != NULL)
@@ -273,6 +274,9 @@
 	if ((cptr = strrchr (progname, '\\')) != NULL)
 		progname = cptr + 1 ;
 
+	
+	sf_command (NULL, SFC_GET_LIB_VERSION, lsf_ver, sizeof (lsf_ver)) ;
+
 	printf ("\n"
 		"  A Sample Rate Converter using libsndfile for file I/O and Secret \n"
 		"  Rabbit Code (aka libsamplerate) for performing the conversion.\n"
@@ -279,12 +283,13 @@
 		"  It works on any file format supported by libsndfile with any \n"
 		"  number of channels (limited only by host memory).\n"
 		"\n"
-		"  libsamplerate version : %s\n"
+		"       %s\n"
+		"       %s\n"
 		"\n"
 		"  Usage : \n"
 		"       %s -to <new sample rate> [-c <number>] <input file> <output file>\n"
 		"       %s -by <amount> [-c <number>] <input file> <output file>\n"
-		"\n", src_get_version (), progname, progname) ;
+		"\n", src_get_version (), lsf_ver, progname, progname) ;
 
 	puts (
 		"  The optional -c argument allows the converter type to be chosen from\n"