From: Paul Brossier Date: Fri, 24 Mar 2017 17:28:35 +0000 (+0100) Subject: README.md: move api description to doc/develop.rst X-Git-Tag: 0.4.5~42 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=5399f174a309d47320b07089de6ddbd3cbf8c288;p=aubio.git README.md: move api description to doc/develop.rst --- diff --git a/README.md b/README.md index 7169b967..7055c1b8 100644 --- 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 diff --git a/doc/develop.rst b/doc/develop.rst index cb39dd78..46b78b8d 100644 --- a/doc/develop.rst +++ b/doc/develop.rst @@ -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 ``````````````````