cannam@126: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> cannam@126: <HTML> cannam@126: cannam@126: <HEAD> cannam@126: <TITLE> cannam@126: Secret Rabbit Code (aka libsamplerate) cannam@126: </TITLE> cannam@126: <META NAME="Author" CONTENT="Erik de Castro Lopo (erikd AT mega-nerd DOT com)"> cannam@126: <META NAME="Version" CONTENT="libsamplerate-0.1.8"> cannam@126: <META NAME="Description" CONTENT="The Secret Rabbit Code Home Page"> cannam@126: <META NAME="Keywords" CONTENT="libsamplerate sound resample audio dsp Linux"> cannam@126: <LINK REL=StyleSheet HREF="SRC.css" TYPE="text/css" MEDIA="all"> cannam@126: </HEAD> cannam@126: cannam@126: <BODY TEXT="#FFFFFF" BGCOLOR="#000000" LINK="#FB1465" VLINK="#FB1465" ALINK="#FB1465"> cannam@126: <!-- pepper --> cannam@126: <CENTER> cannam@126: <IMG SRC="SRC.png" HEIGHT=100 WIDTH=760 ALT="SRC.png"> cannam@126: </CENTER> cannam@126: <!-- pepper --> cannam@126: <BR> cannam@126: <!-- pepper --> cannam@126: <TABLE ALIGN="center" WIDTH="98%"> cannam@126: <TR> cannam@126: <TD VALIGN="top"> cannam@126: <BR> cannam@126: <DIV CLASS="nav"> cannam@126: <BR> cannam@126: <A HREF="index.html">Home</A><BR> cannam@126: <A HREF="license.html">License</A><BR> cannam@126: <A HREF="history.html">History</A><BR> cannam@126: <A HREF="download.html">Download</A><BR> cannam@126: <A HREF="quality.html">Quality</A><BR> cannam@126: <A HREF="api.html">API</A><BR> cannam@126: <A HREF="bugs.html">Bug Reporting</A><BR> cannam@126: <A HREF="win32.html">On Win32</A><BR> cannam@126: <A HREF="faq.html">FAQ</A><BR> cannam@126: <A HREF="lists.html">Mailing Lists</A><BR> cannam@126: <A HREF="ChangeLog">ChangeLog</A><BR> cannam@126: <BR> cannam@126: <DIV CLASS="block"> cannam@126: Author :<BR>Erik de Castro Lopo cannam@126: <!-- pepper --> cannam@126: <BR><BR> cannam@126: <!-- pepper --> cannam@126: cannam@126: </DIV> cannam@126: <IMG SRC= cannam@126: "/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: HEIGHT=30 WIDTH=100 ALT="counter.gif"> cannam@126: </DIV> cannam@126: cannam@126: </TD> cannam@126: <!-- pepper --> cannam@126: <!-- ######################################################################## --> cannam@126: <!-- pepper --> cannam@126: <TD VALIGN="top"> cannam@126: <DIV CLASS="block"> cannam@126: cannam@126: <H1><B>Applications Programming Interface</B></H1> cannam@126: <P> cannam@126: The publically callable functions of libsamplerate are all listed in the cannam@126: <B><samplerate.h></B> header file. cannam@126: In order to use any of the functionality of libsamplerate, you need to add cannam@126: </P> cannam@126: <PRE> cannam@126: #include <samplerate.h> cannam@126: </PRE> cannam@126: <P> cannam@126: to the top of any function that call any of the following functions. cannam@126: You will also need to link you binary with the libsamplerate library. cannam@126: </P> cannam@126: <P> cannam@126: The API allows three methods for accessing the capabilies of the library: cannam@126: </P> cannam@126: <UL> cannam@126: <LI>A <A HREF="api_simple.html">simple interface</A> which can sample rate convert cannam@126: a single block of samples (one or more channels) in one go. cannam@126: The simple API is less capable than the full API. cannam@126: <LI>A <A HREF="api_full.html">more fully featured interface</A> which allows time cannam@126: varying sample rate conversion on streaming data (again one or more cannam@126: channels). cannam@126: <LI>A <A HREF="api_callback.html">callback interface</A> which has the same cannam@126: functionality as the interface above but allows the details of input and cannam@126: output to be separated. cannam@126: The output is generated by call a read function and the library calls a user cannam@126: supplied callback function to obtain its input. cannam@126: This interface is particularly well suited to applications where the output cannam@126: sample rate is varied with time. cannam@126: </UL> cannam@126: cannam@126: <P> cannam@126: <b>NB :</b> All three access methods are able to process multi channel interleaved cannam@126: data. cannam@126: </P> cannam@126: cannam@126: <P> cannam@126: The parts of the API which are common to all three interfaces are: cannam@126: </P> cannam@126: <UL> cannam@126: <LI> The <A HREF="api_misc.html#ErrorReporting">error reporting</A> mechanisim. cannam@126: <LI> The available <A HREF="api_misc.html#Converters">converter</A> types. cannam@126: <LI> The <A HREF="api_misc.html#SRC_DATA">SRC_DATA</A> struct. cannam@126: </UL> cannam@126: <P> cannam@126: All three versions of the API are restricted to operating on buffers of ISO C cannam@126: Standard <B>float</B> data. cannam@126: However, there are two cannam@126: <A HREF="api_misc.html#Aux">auxillary functions</A> cannam@126: for converting arrays of float data to and from short data. cannam@126: </P> cannam@126: cannam@126: <P> cannam@126: <B>Note:</B> The <B>tests/</B> and <B>examples/</B> directories of the source code cannam@126: distribution contain numerous example programs showing the use of the library. cannam@126: </P> cannam@126: cannam@126: <!-- pepper --> cannam@126: <!-- <A HREF="mailto:aldel0305@mega-nerd.com">For the spam bots</A> --> cannam@126: <!-- pepper --> cannam@126: cannam@126: </DIV> cannam@126: </TD></TR> cannam@126: </TABLE> cannam@126: cannam@126: </BODY> cannam@126: </HTML>