History

Update site documentation

* Use GitHub's Jekyll static site generator. * Move all documentation to docs/ directory. * Convert HTML to Markdown.

evpobr committed 6 years ago

Commit 260c3f61 parent 01284e738 files · +1057 −2227Browse files

Showing the changes to docs/api.md (1 of 38 files). Show all

Unified · Split

docs/api.md+46−0
@@ -0,0 +1,46 @@
1+---
2+layout: default
3+---
4+
5+# Applications Programming Interface
6+
7+The publically callable functions of libsamplerate are all listed in the
8+**\<samplerate.h\>** header file. In order to use any of the functionality of
9+libsamplerate, you need to add
10+
11+```c
12+#include <samplerate.h>
13+```
14+
15+to the top of any function that call any of the following functions. You will
16+also need to link you binary with the libsamplerate library.
17+
18+The API allows three methods for accessing the capabilies of the library:
19+
20+- A [simple interface](api_simple.md) which can sample rate convert a single
21+ block of samples (one or more channels) in one go. The simple API is less
22+ capable than the full API.
23+- A [more fully featured interface](api_full.md) which allows time varying
24+ sample rate conversion on streaming data (again one or more channels).
25+- A [callback interface](api_callback.md) which has the same functionality as
26+ the interface above but allows the details of input and output to be
27+ separated. The output is generated by call a read function and the library
28+ calls a user supplied callback function to obtain its input. This interface is
29+ particularly well suited to applications where the output sample rate is
30+ varied with time.
31+
32+**NB :** All three access methods are able to process multi channel interleaved
33+data.
34+
35+The parts of the API which are common to all three interfaces are:
36+
37+- The [error reporting](api_misc.md#error-reporting) mechanisim.
38+- The available [converter](api_misc.md#converters) types.
39+- The [SRC_DATA](api_misc.md#src_data) struct.
40+
41+All three versions of the API are restricted to operating on buffers of ISO C
42+Standard **float** data. However, there are two [auxillary functions](api_misc.md#auxillary-functions)
43+for converting arrays of float data to and from short data.
44+
45+**Note:** The **tests/** and **examples/** directories of the source code
46+distribution contain numerous example programs showing the use of the library.

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t