annotate src/libsamplerate-0.1.9/doc/api.html @ 41:481f5f8c5634

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