README.md: move api description to doc/develop.rst
authorPaul Brossier <piem@piem.org>
Fri, 24 Mar 2017 17:28:35 +0000 (18:28 +0100)
committerPaul Brossier <piem@piem.org>
Fri, 24 Mar 2017 17:28:35 +0000 (18:28 +0100)
README.md
doc/develop.rst

index 7169b96..7055c1b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -56,23 +56,6 @@ Additionally, the python module comes with the following script:
 
  - `aubiocut` slices sound files at onset or beat timestamps
 
-Implementation and Design Basics
---------------------------------
-
-The library is written in C and is optimised for speed and portability.
-
-The C API is designed in the following way:
-
-    aubio_something_t * new_aubio_something (void * args);
-    audio_something_do (aubio_something_t * t, void * args);
-    smpl_t aubio_something_get_a_parameter (aubio_something_t *t);
-    uint_t aubio_something_set_a_parameter (aubio_something_t *t, smpl_t a_parameter);
-    void del_aubio_something (aubio_something_t * t);
-
-For performance and real-time operation, no memory allocation or freeing take
-place in the `_do` methods. Instead, memory allocation should always take place
-in the `new_` methods, whereas free operations are done in the `del_` methods.
-
 The latest version of the documentation can be found at:
 
   https://aubio.org/documentation
index cb39dd7..46b78b8 100644 (file)
@@ -16,6 +16,31 @@ Library overview
 Here is a brief overview of the C library. See also the `Doxygen
 documentation`_ for a more detailed list of available functions.
 
+Design Basics
+`````````````
+
+The library is written in C and is optimised for speed and portability.
+
+The C API is designed in the following way:
+
+.. code-block:: C
+
+   // new_ to create an object foobar
+   aubio_foobar_t * new_aubio_foobar(void * args);
+   // del_ to delete foobar
+   void del_aubio_something (aubio_something_t * t);
+   // _do to process output = foobar(input)
+   audio_something_do (aubio_something_t * t, fvec_t * input, cvec_t * output);
+   // _get_param to get foobar.param
+   smpl_t aubio_something_get_a_parameter (aubio_something_t * t);
+   // _set_param to set foobar.param
+   uint_t aubio_something_set_a_parameter (aubio_something_t * t, smpl_t a_parameter);
+
+For performance and real-time operation, no memory allocation or freeing take
+place in the `_do` methods. Instead, memory allocation should always take place
+in the `new_` methods, whereas free operations are done in the `del_` methods.
+
+
 Vectors and matrix
 ``````````````````