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