| cannam@126 | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | 
| cannam@126 | 2 <HTML> | 
| cannam@126 | 3 | 
| cannam@126 | 4 <HEAD> | 
| cannam@126 | 5 	<TITLE> | 
| cannam@126 | 6 	Secret Rabbit Code (aka libsamplerate) | 
| cannam@126 | 7 	</TITLE> | 
| cannam@126 | 8 	<META NAME="Author"      CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)"> | 
| cannam@126 | 9     <META NAME="Version"     CONTENT="libsamplerate-0.1.8"> | 
| cannam@126 | 10 	<META NAME="Description" CONTENT="The Secret Rabbit Code Home Page"> | 
| cannam@126 | 11 	<META NAME="Keywords"    CONTENT="libsamplerate sound resample audio dsp Linux"> | 
| cannam@126 | 12 	<LINK REL=StyleSheet HREF="SRC.css" TYPE="text/css" MEDIA="all"> | 
| cannam@126 | 13 </HEAD> | 
| cannam@126 | 14 | 
| cannam@126 | 15 <BODY TEXT="#FFFFFF" BGCOLOR="#000000" LINK="#FB1465" VLINK="#FB1465" ALINK="#FB1465"> | 
| cannam@126 | 16 <!-- pepper --> | 
| cannam@126 | 17 <CENTER> | 
| cannam@126 | 18 	<IMG SRC="SRC.png" HEIGHT=100 WIDTH=760 ALT="SRC.png"> | 
| cannam@126 | 19 </CENTER> | 
| cannam@126 | 20 <!-- pepper --> | 
| cannam@126 | 21 <BR> | 
| cannam@126 | 22 <!-- pepper --> | 
| cannam@126 | 23 <TABLE ALIGN="center" WIDTH="98%"> | 
| cannam@126 | 24 <TR> | 
| cannam@126 | 25 <TD VALIGN="top"> | 
| cannam@126 | 26 <BR> | 
| cannam@126 | 27 <DIV CLASS="nav"> | 
| cannam@126 | 28 	<BR> | 
| cannam@126 | 29 	<A HREF="index.html">Home</A><BR> | 
| cannam@126 | 30 	<A HREF="license.html">License</A><BR> | 
| cannam@126 | 31 	<A HREF="history.html">History</A><BR> | 
| cannam@126 | 32 	<A HREF="download.html">Download</A><BR> | 
| cannam@126 | 33 	<A HREF="quality.html">Quality</A><BR> | 
| cannam@126 | 34 	<A HREF="api.html">API</A><BR> | 
| cannam@126 | 35 	<A HREF="bugs.html">Bug Reporting</A><BR> | 
| cannam@126 | 36 	<A HREF="win32.html">On Win32</A><BR> | 
| cannam@126 | 37 	<A HREF="faq.html">FAQ</A><BR> | 
| cannam@126 | 38 	<A HREF="lists.html">Mailing Lists</A><BR> | 
| cannam@126 | 39 	<A HREF="ChangeLog">ChangeLog</A><BR> | 
| cannam@126 | 40 <BR> | 
| cannam@126 | 41 <DIV CLASS="block"> | 
| cannam@126 | 42 Author :<BR>Erik de Castro Lopo | 
| cannam@126 | 43 <!-- pepper --> | 
| cannam@126 | 44 <BR><BR> | 
| cannam@126 | 45 <!-- pepper --> | 
| cannam@126 | 46 | 
| cannam@126 | 47 </DIV> | 
| cannam@126 | 48 	<IMG SRC= | 
| cannam@126 | 49 	"/cgi-bin/Count.cgi?ft=6|frgb=55;55;55|tr=0|md=6|dd=B|st=1|sh=1|df=src_api.dat" | 
| cannam@126 | 50 	HEIGHT=30 WIDTH=100 ALT="counter.gif"> | 
| cannam@126 | 51 </DIV> | 
| cannam@126 | 52 | 
| cannam@126 | 53 </TD> | 
| cannam@126 | 54 <!-- pepper --> | 
| cannam@126 | 55 <!-- ######################################################################## --> | 
| cannam@126 | 56 <!-- pepper --> | 
| cannam@126 | 57 <TD VALIGN="top"> | 
| cannam@126 | 58 <DIV CLASS="block"> | 
| cannam@126 | 59 | 
| cannam@126 | 60 <H1><B>Applications Programming Interface</B></H1> | 
| cannam@126 | 61 <P> | 
| cannam@126 | 62 The publically callable functions of libsamplerate are all listed in the | 
| cannam@126 | 63 <B><samplerate.h></B> header file. | 
| cannam@126 | 64 In order to use any of the functionality of libsamplerate, you need to add | 
| cannam@126 | 65 </P> | 
| cannam@126 | 66 <PRE> | 
| cannam@126 | 67 	#include <samplerate.h> | 
| cannam@126 | 68 </PRE> | 
| cannam@126 | 69 <P> | 
| cannam@126 | 70 to the top of any function that call any of the following functions. | 
| cannam@126 | 71 You will also need to link you binary with the libsamplerate library. | 
| cannam@126 | 72 </P> | 
| cannam@126 | 73 <P> | 
| cannam@126 | 74 The API allows three methods for accessing the capabilies of the library: | 
| cannam@126 | 75 </P> | 
| cannam@126 | 76 <UL> | 
| cannam@126 | 77 	<LI>A <A HREF="api_simple.html">simple interface</A> which can sample rate convert | 
| cannam@126 | 78 		a single block of samples (one or more channels) in one go. | 
| cannam@126 | 79 		The simple API is less capable than the full API. | 
| cannam@126 | 80 	<LI>A <A HREF="api_full.html">more fully featured interface</A> which allows time | 
| cannam@126 | 81 		varying sample rate conversion on streaming data (again one or more | 
| cannam@126 | 82 		channels). | 
| cannam@126 | 83 	<LI>A <A HREF="api_callback.html">callback interface</A> which has the same | 
| cannam@126 | 84 		functionality as the interface above but allows the details of input and | 
| cannam@126 | 85 		output to be separated. | 
| cannam@126 | 86 		The output is generated by call a read function and the library calls a user | 
| cannam@126 | 87 		supplied callback function to obtain its input. | 
| cannam@126 | 88 		This interface is particularly well suited to applications where the output | 
| cannam@126 | 89 		sample rate is varied with time. | 
| cannam@126 | 90 </UL> | 
| cannam@126 | 91 | 
| cannam@126 | 92 <P> | 
| cannam@126 | 93 <b>NB :</b> All three access methods are able to process multi channel interleaved | 
| cannam@126 | 94 data. | 
| cannam@126 | 95 </P> | 
| cannam@126 | 96 | 
| cannam@126 | 97 <P> | 
| cannam@126 | 98 The parts of the API which are common to all three interfaces are: | 
| cannam@126 | 99 </P> | 
| cannam@126 | 100 <UL> | 
| cannam@126 | 101 	<LI> The <A HREF="api_misc.html#ErrorReporting">error reporting</A>  mechanisim. | 
| cannam@126 | 102 	<LI> The available <A HREF="api_misc.html#Converters">converter</A> types. | 
| cannam@126 | 103 	<LI> The <A HREF="api_misc.html#SRC_DATA">SRC_DATA</A> struct. | 
| cannam@126 | 104 </UL> | 
| cannam@126 | 105 <P> | 
| cannam@126 | 106 All three versions of the API are restricted to operating on buffers of ISO C | 
| cannam@126 | 107 Standard  <B>float</B> data. | 
| cannam@126 | 108 However, there are two | 
| cannam@126 | 109 	<A HREF="api_misc.html#Aux">auxillary functions</A> | 
| cannam@126 | 110 for converting arrays of float data to and from short data. | 
| cannam@126 | 111 </P> | 
| cannam@126 | 112 | 
| cannam@126 | 113 <P> | 
| cannam@126 | 114 <B>Note:</B> The <B>tests/</B> and <B>examples/</B> directories of the source code | 
| cannam@126 | 115 distribution contain numerous example programs showing the use of the library. | 
| cannam@126 | 116 </P> | 
| cannam@126 | 117 | 
| cannam@126 | 118 <!-- pepper --> | 
| cannam@126 | 119 <!-- <A HREF="mailto:aldel0305@mega-nerd.com">For the spam bots</A> --> | 
| cannam@126 | 120 <!-- pepper --> | 
| cannam@126 | 121 | 
| cannam@126 | 122 </DIV> | 
| cannam@126 | 123 </TD></TR> | 
| cannam@126 | 124 </TABLE> | 
| cannam@126 | 125 | 
| cannam@126 | 126 </BODY> | 
| cannam@126 | 127 </HTML> |