shithub: libsamplerate

Download patch

ref: 975555c0ef294161f3f6920a9cb69a7a6d25a11c
parent: 918ab6fd4edd4b94a13fe4385acf18bdaac8864c
author: Erik de Castro Lopo <erikd@mega-nerd.com>
date: Thu Feb 26 11:23:53 EST 2009

doc/api_(full|callback).html : Improve explanation of use of src_set_ratio() function.

--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
     * Win32/Makefile.msvc
     Add /Zm1000 to the CFLAGS as suggested by Kun Niu.
 
+    * doc/api_full.html doc/api_callback.html
+    Improve explanation of use of src_set_ratio() function.
+
 2009-02-14  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * src/common.h src/samplerate.c
--- a/doc/api_callback.html
+++ b/doc/api_callback.html
@@ -160,6 +160,11 @@
 src_error</A> will return non-zero.
 </P>
 
+<P>
+See also :
+	<A HREF="api_full.html#SetRatio"><B>src_set_ratio</B></A>
+</P>
+
 <!-- pepper -->
 
 </DIV>
--- a/doc/api_full.html
+++ b/doc/api_full.html
@@ -168,12 +168,24 @@
 <PRE>
       int src_set_ratio (SRC_STATE *state, double new_ratio) ;
 </PRE>
+
+<p>
+When using the <B>src_process</B> or <B>src_callback_process</B> APIs and 
+updating the <B>src_ratio</B> field of the <B>SRC_STATE</B> struct, the library
+will try to smoothly transition between the conversion ratio of the last call
+and the conversion ratio of the current call.
+<p/>
+
 <P>
-The <B>src_set_ratio</B> function allows the modification of the conversion
-ratio between calls to <B>src_process</B>.
-This allows a step response in the conversion ratio.
-It returns non-zero on error and the error return value can be decoded into 
-a text string using the function documented 
+If the user want to bypass this smooth transition and achieve a step response in
+the conversion ratio, the <B>src_set_ratio</B> function can be used to set the
+starting conversion ratio of the next call to <B>src_process</B> or
+<B>src_callback_process</B>.
+<p/>
+
+<P>
+This function returns non-zero on error and the error return value can be
+decoded into a text string using the function documented 
 <A HREF="api_misc.html#ErrorReporting">here</A>.</P>
 
 <!-- <A HREF="mailto:aldel@mega-nerd.com">For the spam bots</A> -->