shithub: libsamplerate

Download patch

ref: 91e39f09acadede72d2b9162516fcba2c7e06c73
parent: 8933ec5e597a3be4ffbb04203e18b621a531592f
author: Erik de Castro Lopo <[email protected]>
date: Sun Jan 21 06:28:33 EST 2007

Update docs to make handling of interleaved data more explicit.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-01-21  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
+
+    * doc/api.html doc/api_callback.html doc/api_misc.html
+    Update docs to make handling of interleaved data more explicit.
+
 2006-07-26  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * examples/audio_out.c
--- a/doc/api.html
+++ b/doc/api.html
@@ -88,9 +88,15 @@
 		This interface is particularly well suited to applications where the output
 		sample rate is varied with time.
 </UL>
+
 <P>
-The parts of the API which are common to both are:
+<b>NB :</b> All three access methods are able to process multi channel interleaved 
+data.
 </P>
+
+<P>
+The parts of the API which are common to all three interfaces are:
+</P>
 <UL>
 	<LI> The <A HREF="api_misc.html#ErrorReporting">error reporting</A>  mechanisim.
 	<LI> The available <A HREF="api_misc.html#Converters">converter</A> types.
@@ -119,12 +125,3 @@
 
 </BODY>
 </HTML>
-
-<!--
-  Do not edit or modify anything in this comment block.
-  The arch-tag line is a file identity tag for the GNU Arch 
-  revision control system.
- 
-  arch-tag: d1c3051e-f026-48e1-b72c-ff1dd8503272
--->
-
--- a/doc/api_callback.html
+++ b/doc/api_callback.html
@@ -73,7 +73,16 @@
       int <A HREF="api_full.html#SetRatio">src_set_ratio</A> (SRC_STATE *state, double new_ratio) ;
 </PRE>
 <BR>
+
 <P>
+Like the
+	<A HREF="api_simple.html">simple API</a>
+and the
+	<A HREF="api_full.html">full API</a>,
+the callback based API is able to operate on interleaved multi channel data.
+</P>
+
+<P>
 An example of the use of the callback based API can be found in the
 <B>varispeed-play</B> program in the <B>examples/</B> directory of the
 source code tarball.
@@ -127,10 +136,11 @@
 	                       long frames, float *data) ;
 </PRE>
 <P>
-The <B>src_callback_read</B> function is passed the <B>SRC_STATE</B> pointer
-returned by <B>src_callback_new</B>, the coversion ratio (output_sample_rate
-/ input_sample_rate), the maximum number of output frames to generate and a
-pointer to a buffer in which to place the output data.
+The <B>src_callback_read</B> function is passed the 
+	<A HREF="api_misc.html#SRC_DATA"><B>SRC_STATE</B></A>
+pointer returned by <B>src_callback_new</B>, the coversion ratio 
+(output_sample_rate / input_sample_rate), the maximum number of output frames 
+to generate and a pointer to a buffer in which to place the output data.
 </P>
 <P>
 The <B>src_callback_read</B> function returns the number of frames generated
@@ -148,12 +158,4 @@
 
 </BODY>
 </HTML>
-
-<!--
-  Do not edit or modify anything in this comment block.
-  The arch-tag line is a file identity tag for the GNU Arch
-  revision control system.
-
-  arch-tag: c80cf67e-b7a1-4701-a608-a1718c5aa57d
--->
 
--- a/doc/api_misc.html
+++ b/doc/api_misc.html
@@ -161,14 +161,16 @@
 The <B>data_in</B> pointer is used to pass audio data into the converter while the
 <B>data_out</B> pointer supplies the converter with an array to hold the converter's
 output.
+For a converter which has been configured for mulitchannel operation, these pointers
+need to point to a single array of interleaved data.
 </P>
 <P>
 The <B>input_frames</B> and <B>output_frames</B> fields supply the converter with 
-the lengths of the arrays pointed to by the <B>data_in</B> and <b>data_out</B> 
-pointers respectively.
+the lengths of the arrays (in frames) pointed to by the <B>data_in</B> and 
+<b>data_out</B> pointers respectively.
 For monophinc data, these values would indicate the length of the arrays while
-for stereo data these values would be equal to the half the length of the array
-and so on.
+for multi channel data these values would be equal to the the length of the array
+divided by the number of channels.
 </P>
 
 <P>