Changes in / [fbafd2c:f8d96f1]


Ignore:
Files:
1 added
5 deleted
18 edited

Legend:

Unmodified
Added
Removed
  • .gitignore

    rfbafd2c rf8d96f1  
    3939python/*.wav
    4040
    41 pip-delete-this-directory.txt
    42 
    4341aubio-*.tar.bz2
    4442aubio-*.zip
    45 dist/*.tar.gz
    4643
    4744# test sounds
  • MANIFEST.in

    rfbafd2c rf8d96f1  
    11include AUTHORS COPYING README.md VERSION ChangeLog
    22include python/README.md
    3 include this_version.py
    43include Makefile wscript */wscript_build
    54include waf waflib/* waflib/*/*
  • README.md

    rfbafd2c rf8d96f1  
    1 aubio
    2 =====
    3 
    4 [![Travis build status](https://travis-ci.org/aubio/aubio.svg?branch=master)](https://travis-ci.org/aubio/aubio "Travis build status")
    5 [![Appveyor build status](https://ci.appveyor.com/api/projects/status/f3lhy3a57rkgn5yi?svg=true)](https://ci.appveyor.com/project/piem/aubio "Appveyor build status")
    6 [![Landscape code health](https://landscape.io/github/aubio/aubio/master/landscape.svg?style=flat)](https://landscape.io/github/aubio/aubio/master "Landscape code health")
    7 [![Documentation Status](https://readthedocs.org/projects/aubio/badge/?version=latest)](http://aubio.readthedocs.io/en/latest/?badge=latest "Documentation status")
    8 [![Commits since last release](https://img.shields.io/github/commits-since/aubio/aubio/0.4.4.svg?maxAge=2592000)](https://github.com/aubio/aubio "Commits since last release")
     1aubio library
     2=============
    93
    104aubio is a library to label music and sounds. It listens to audio signals and
     
    5751 - `aubiocut` slices sound files at onset or beat timestamps
    5852
     53Implementation and Design Basics
     54--------------------------------
     55
     56The library is written in C and is optimised for speed and portability.
     57
     58The C API is designed in the following way:
     59
     60    aubio_something_t * new_aubio_something (void * args);
     61    audio_something_do (aubio_something_t * t, void * args);
     62    smpl_t aubio_something_get_a_parameter (aubio_something_t *t);
     63    uint_t aubio_something_set_a_parameter (aubio_something_t *t, smpl_t a_parameter);
     64    void del_aubio_something (aubio_something_t * t);
     65
     66For performance and real-time operation, no memory allocation or freeing take
     67place in the `_do` methods. Instead, memory allocation should always take place
     68in the `new_` methods, whereas free operations are done in the `del_` methods.
     69
    5970The latest version of the documentation can be found at:
    6071
     
    6475------------------
    6576
     77A number of distributions already include aubio. Check your favorite package
     78management system, or have a look at the [download
     79page](https://aubio.org/download).
     80
     81aubio uses [waf](https://waf.io/) to configure, compile, and test the source:
     82
     83    ./waf configure
     84    ./waf build
     85
     86If waf is not found in the directory, you can download and install it with:
     87
     88    make getwaf
     89
    6690aubio compiles on Linux, Mac OS X, Windows, Cygwin, and iOS.
    6791
    68 To compile aubio, you should be able to simply run:
     92Installation
     93------------
    6994
    70     make
     95To install aubio library and headers on your system, use:
    7196
    72 To compile the python module:
     97    sudo ./waf install
    7398
    74     ./setup.py build
     99To uninstall:
    75100
    76 See also the [manual](https://aubio.org/manual/latest/) for more information
    77 about [compiling](https://aubio.org/manual/latest/building.html) and
    78 [installing](https://aubio.org/manual/latest/installing.html).
     101    sudo ./waf uninstall
     102
     103If you don't have root access to install libaubio on your system, you can use
     104libaubio without installing libaubio either by setting `LD_LIBRARY_PATH`, or by
     105copying it to `~/lib`.
     106
     107On Linux, you should be able to set `LD_LIBRARY_PATH` with:
     108
     109    $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/build/src
     110
     111On Mac OS X, a copy or a symlink can be made in `~/lib`:
     112
     113    $ mkdir -p ~/lib
     114    $ ln -sf $PWD/build/src/libaubio*.dylib ~/lib/
     115
     116Note on Mac OS X systems older than El Capitan (10.11), the `DYLD_LIBRARY_PATH`
     117variable can be set as follows:
     118
     119    $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/build/src
    79120
    80121Credits and Publications
  • doc/android.rst

    rfbafd2c rf8d96f1  
    11.. _android:
    22
    3 Android build
    4 -------------
     3Building aubio for Android
     4--------------------------
    55
    66To compile aubio for android, you will need to get the `Android Native
  • doc/building.rst

    rfbafd2c rf8d96f1  
    2121The **latest stable release** can be downloaded from https://aubio.org/download::
    2222
    23         $ curl -O http://aubio.org/pub/aubio-<version>.tar.bz2
    24         $ tar xf aubio-<version>.tar.bz2
    25         $ cd aubio-<version>/
     23        $ curl -O http://aubio.org/pub/aubio-0.4.3.tar.bz2
     24        $ tar xf aubio-0.4.3.tar.bz2
     25        $ cd aubio-0.4.3
    2626
    2727Git repository
     
    3131
    3232        $ git clone git://git.aubio.org/git/aubio
    33         $ cd aubio/
     33        $ cd aubio
    3434
    3535The following command will fetch the correct `waf`_ version (not included in
     
    7474       $ waf configure build
    7575
    76 
    77 Running as a user
    78 -----------------
    79 
    80 To use aubio without actually installing, for instance if you don't have root
    81 access to install libaubio on your system,
    82 
    83 On Linux or macOS, sourcing the script ``scripts/setenv_local.sh`` should help::
    84 
    85        $ source ./scripts/setenv_local.sh
    86 
    87 This script sets ``LD_LIBRARY_PATH``, for libaubio, and ``PYTHONPATH`` for the
    88 python module.
    89 
    90 On Linux, you should be able to set ``LD_LIBRARY_PATH`` with::
    91 
    92         $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/build/src
    93 
    94 On Mac OS X, a copy or a symlink can be made in ``~/lib``::
    95 
    96         $ mkdir -p ~/lib
    97         $ ln -sf $PWD/build/src/libaubio*.dylib ~/lib/
    98 
    99 Note on Mac OS X systems older than El Capitan (10.11), the ``DYLD_LIBRARY_PATH``
    100 variable can be set as follows::
    101 
    102         $ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PWD/build/src
    103 
    10476Cleaning
    10577--------
     
    12395.. _Git Bash: https://git-for-windows.github.io/
    12496
    125 .. _xcode-frameworks-label:
    126 
    127 .. include:: xcode_frameworks.rst
    128 
    129 .. include:: android.rst
     97.. toctree::
     98   :maxdepth: 2
  • doc/cli.rst

    rfbafd2c rf8d96f1  
    44==================
    55
    6 The python module comes with the following tools:
    7 
    8  - ``aubio`` estimate and extract descriptors from sound files
    9  - ``aubiocut`` slices sound files at onset or beat timestamps
    10 
    11 More command line tools are included along with the library.
     6A few simple command line tools are included along with the library.
    127
    138 - ``aubioonset`` outputs the time stamp of detected note onsets
     
    1914 - ``aubioquiet`` extracts quiet and loud regions
    2015
     16Additionally, the python module comes with the following script:
    2117
    22 ``aubio``
    23 ---------
    24 
    25 .. literalinclude:: aubio.txt
    26    :language: text
     18 - ``aubiocut`` slices sound files at onset or beat timestamps
    2719
    2820
    29 ``aubiocut``
    30 --------------
     21.. toctree::
    3122
    32 .. literalinclude:: aubiocut.txt
    33    :language: text
     23   cli_features
    3424
    3525
     
    3828
    3929.. literalinclude:: aubioonset.txt
    40    :language: text
    4130
    4231``aubiopitch``
     
    4433
    4534.. literalinclude:: aubiopitch.txt
    46    :language: text
    4735
    4836``aubiomfcc``
     
    5038
    5139.. literalinclude:: aubiomfcc.txt
    52    :language: text
    5340
    5441``aubiotrack``
     
    5643
    5744.. literalinclude:: aubiotrack.txt
    58    :language: text
    5945
    6046``aubionotes``
     
    6248
    6349.. literalinclude:: aubionotes.txt
    64    :language: text
    6550
    6651``aubioquiet``
     
    6853
    6954.. literalinclude:: aubioquiet.txt
    70    :language: text
    7155
     56``aubiocut``
     57--------------
    7258
    73 .. include:: cli_features.rst
     59.. literalinclude:: aubiocut.txt
  • doc/cli_features.rst

    rfbafd2c rf8d96f1  
    11Command line features
    2 ---------------------
     2=====================
    33
    44+--------------+-------+-------+------+-------+-------+-------+------+------------------+
  • doc/conf.py

    rfbafd2c rf8d96f1  
    1313
    1414import sys, os
    15 
    16 # get version using this_version.py
    17 sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
    18 from this_version import get_aubio_version
    1915
    2016# If extensions (or modules to document with autodoc) are in another directory,
     
    5349#
    5450# The short X.Y version.
    55 
    56 version = get_aubio_version()[:3]
     51version = '0.4'
    5752# The full version, including alpha/beta/rc tags.
    58 release = get_aubio_version()
     53release = '0.4.5~alpha'
    5954
    6055# The language for content autogenerated by Sphinx. Refer to documentation
     
    7065# List of patterns, relative to source directory, that match files and
    7166# directories to ignore when looking for source files.
    72 exclude_patterns = ['_build',
    73         'statuslinks.rst',
    74         'download.rst',
    75         'binaries.rst',
    76         'debian_packages.rst',
    77         'building.rst',
    78         'android.rst',
    79         'xcode_frameworks.rst',
    80         'requirements.rst',
    81         'cli_features.rst',
    82         ]
     67exclude_patterns = ['_build']
    8368
    8469# The reST default role (used for this markup: `text`) to use for all documents.
  • doc/develop.rst

    rfbafd2c rf8d96f1  
    44======================
    55
    6 Here is a brief overview of the C library.
     6Read `Contribute`_ to report issues and request new features.
    77
    8 For a more detailed list of available functions, see the `API documentation
    9 <https://aubio.org/doc/latest/>`_.
     8See `Doxygen documentation`_ for the complete documentation of the C library,
     9built using `Doxygen <http://www.doxygen.org/>`_.
    1010
    11 To report issues, ask questions, and request new features, use `Github Issues
    12 <https://github.com/aubio/aubio/issues>`_
     11Below is a brief `Library overview`_.
    1312
    14 Design Basics
    15 -------------
     13Library overview
     14----------------
    1615
    17 The library is written in C and is optimised for speed and portability.
     16Here is a brief overview of the C library. See also the `Doxygen
     17documentation`_ for a more detailed list of available functions.
    1818
    19 All memory allocations take place in the `new_` methods. Each successful call
    20 to `new_` should have a matching call to `del_` to deallocate the object.
     19Vectors and matrix
     20``````````````````
     21
     22``fvec_t`` are used to hold vectors of float (``smpl_t``).
     23
     24.. literalinclude:: ../tests/src/test-fvec.c
     25   :language: C
     26   :lines: 7
     27
    2128
    2229.. code-block:: C
    2330
    24    // new_ to create an object foobar
    25    aubio_foobar_t * new_aubio_foobar(void * args);
    26    // del_ to delete foobar
    27    void del_aubio_foobar (aubio_foobar_t * foobar);
     31        // set some elements
     32        vec->data[511] = 2.;
     33        vec->data[vec->length-2] = 1.;
    2834
    29 The main computations are done in the `_do` methods.
     35Similarly, ``fmat_t`` are used to hold matrix of floats.
    3036
    31 .. code-block:: C
    32 
    33    // _do to process output = foobar(input)
    34    audio_foobar_do (aubio_foobar_t * foobar, fvec_t * input, cvec_t * output);
    35 
    36 Most parameters can be read and written at any time:
    37 
    38 .. code-block:: C
    39 
    40    // _get_param to get foobar.param
    41    smpl_t aubio_foobar_get_a_parameter (aubio_foobar_t * foobar);
    42    // _set_param to set foobar.param
    43    uint_t aubio_foobar_set_a_parameter (aubio_foobar_t * foobar, smpl_t a_parameter);
    44 
    45 In some case, more functions are available:
    46 
    47 .. code-block:: C
    48 
    49    // non-real time functions
    50    uint_t aubio_foobar_reset(aubio_foobar_t * t);
    51 
    52 Basic Types
    53 -----------
    54 
    55 .. code-block:: C
    56 
    57     // integers
    58     uint_t n = 10;                 // unsigned
    59     sint_t delay = -90;            // signed
    60 
    61     // float
    62     smpl_t a = -90.;               // simple precision
    63     lsmp_t f = 0.024;              // double precision
    64 
    65     // vector of floats (simple precision)
    66     fvec_t * vec = new_fvec(n);
    67     vec->data[0] = 1;
    68     vec->data[vec->length-1] = 1.; // vec->data has n elements
    69     fvec_print(vec);
    70     del_fvec(vec);
    71 
    72     // complex data
    73     cvec_t * fftgrain = new_cvec(n);
    74     vec->norm[0] = 1.;             // vec->norm has n/2+1 elements
    75     vec->phas[n/2] = 3.1415;       // vec->phas as well
    76     del_cvec(fftgrain);
    77 
    78     // matrix
    79     fmat_t * mat = new_fmat (height, length);
    80     mat->data[height-1][0] = 1;    // mat->data has height rows
    81     mat->data[0][length-1] = 10;   // mat->data[0] has length columns
    82     del_fmat(mat);
    83 
     37.. literalinclude:: ../tests/src/test-fmat.c
     38   :language: C
     39   :lines: 9-19
    8440
    8541Reading a sound file
    86 --------------------
     42````````````````````
     43In this example, ``aubio_source`` is used to read a media file.
    8744
    88 In this example, `aubio_source <https://aubio.org/doc/latest/source_8h.html>`_
    89 is used to read a media file.
    90 
    91 First, define a few variables and allocate some memory.
     45First, create the objects we need.
    9246
    9347.. literalinclude:: ../tests/src/io/test-source.c
     
    10559   :lines: 40-44
    10660
    107 At the end of the processing loop, memory is deallocated:
     61At the end of the processing loop, clean-up and de-allocate memory:
    10862
    10963.. literalinclude:: ../tests/src/io/test-source.c
    11064   :language: C
    111    :lines: 55-56
     65   :lines: 50-56
    11266
    11367See the complete example: :download:`test-source.c
    11468<../tests/src/io/test-source.c>`.
    11569
    116 Computing a spectrum
    117 --------------------
     70Computing the spectrum
     71``````````````````````
    11872
    11973Now let's create a phase vocoder:
     
    12781.. literalinclude:: ../tests/src/spectral/test-phasevoc.c
    12882   :language: C
    129    :lines: 20-37
    130 
    131 Time to clean up the previously allocated memory:
    132 
    133 .. literalinclude:: ../tests/src/spectral/test-phasevoc.c
    134    :language: C
    135    :lines: 39-44
     83   :lines: 21-35
    13684
    13785See the complete example: :download:`test-phasevoc.c
     
    14391---------------------
    14492
    145 The latest version of the API documentation is built using `Doxygen
    146 <http://www.doxygen.org/>`_ and is available at:
     93The latest version of the doxygen documentation is available at:
    14794
    148     https://aubio.org/doc/latest/
     95    https://aubio.org/doc/latest
    14996
    15097Contribute
     
    153100Please report any issue and feature request at the `Github issue tracker
    154101<https://github.com/aubio/aubio/issues>`_. Patches and pull-requests welcome!
     102
  • doc/download.rst

    rfbafd2c rf8d96f1  
    88<https://aubio.org/download>`_ for more options.
    99
     10To use aubio in a macOS or iOS application, see :ref:`xcode-frameworks-label`.
     11
    1012To use aubio in an android project, see :ref:`android`.
    1113
     14.. toctree::
     15
     16  debian_packages
     17  xcode_frameworks
     18  android
     19
    1220To compile aubio from source, read :ref:`building`.
    13 
    14 .. include:: binaries.rst
    15 
    16 .. include:: debian_packages.rst
  • doc/installing.rst

    rfbafd2c rf8d96f1  
    55operating systems.
    66
    7 Aubio is available as a C library and as a python module.
     7To download a pre-compiled version of the library, head to :ref:`download`.
    88
    9 Cheat sheet
    10 -----------
     9To install the python extension, head to :ref:`python`.
    1110
    12 - :ref:`get aubio latest source code <building>`::
     11To compile aubio form source, first check the :ref:`requirements`, then read
     12:ref:`building`.
    1313
    14     # official repo
    15     git clone https://git.aubio.org/aubio/aubio
    16     # mirror
    17     git clone https://github.com/aubio/aubio
    18     # latest release
    19     wget https://aubio.org/pub/aubio-<version>.tar.gz
     14.. toctree::
     15   :maxdepth: 2
    2016
    21 
    22 - :ref:`build aubio from source <building>`::
    23 
    24     # 1. simple
    25     cd aubio
    26     make
    27 
    28     # 2. step by step
    29     ./scripts/get_waf.sh
    30     ./waf configure
    31     ./waf build
    32     sudo ./waf install
    33 
    34 - :ref:`install python-aubio from source <python>`::
    35 
    36     # from git
    37     pip install git+https://git.aubio.org/aubio/aubio/
    38     # mirror
    39     pip install git+https://github.com/aubio/aubio/
    40     # from latest release
    41     pip install https://aubio.org/pub/aubio-latest.tar.bz2
    42     # from pypi
    43     pip install aubio
    44     # from source directory
    45     cd aubio
    46     pip install -v .
    47 
    48 - :ref:`install python-aubio from a pre-compiled binary <python>`::
    49 
    50       # conda [osx, linux, win]
    51       conda install -c conda-forge aubio
    52       # .deb (debian, ubuntu) [linux]
    53       sudo apt-get install python3-aubio python-aubio aubio-tools
    54       # brew [osx]
    55       brew install aubio --with-python
    56 
    57 - :ref:`get a pre-compiled version of libaubio <download>`::
    58 
    59     # .deb (linux) WARNING: old version
    60     sudo apt-get install aubio-tools
    61 
    62     # python module
    63     ./setup.py install
    64     # using pip
    65     pip install .
    66 
    67 - :ref:`check the list of optional dependencies <requirements>`::
    68 
    69     # debian / ubuntu
    70     dpkg -l libavcodec-dev libavutil-dev libavformat-dev \
    71             libswresample-dev libavresample-dev \
    72             libsamplerate-dev libsndfile-dev \
    73             txt2man doxygen
    74 
    75 .. include:: download.rst
    76 
    77 .. include:: building.rst
    78 
    79 .. include:: requirements.rst
     17   download
     18   building
     19   requirements
  • doc/xcode_frameworks.rst

    rfbafd2c rf8d96f1  
    1 Frameworks for Xcode
    2 --------------------
     1.. _xcode-frameworks-label:
     2
     3Using aubio frameworks in Xcode
     4-------------------------------
    35
    46`Binary frameworks`_ are available and ready to use in your XCode project, for
     
    3436
    3537Using aubio from swift
    36 ----------------------
    37 
    38 Once you have downloaded and installed :ref:`aubio.framework
    39 <xcode-frameworks-label>`, you sould be able to use aubio from C, Obj-C, and
    40 Swift source files.
    41 
     38......................
    4239
    4340Here is a short example showing how to read a sound file in swift:
     
    7168.. _iOS: https://aubio.org/download#ios
    7269.. _macOS: https://aubio.org/download#osx
     70.. _Download: https://aubio.org/download
  • python/lib/moresetuptools.py

    rfbafd2c rf8d96f1  
    55from .gen_external import generate_external, header, output_path
    66
    7 from this_version import get_aubio_version
     7def get_aubio_version():
     8    # read from VERSION
     9    this_file_dir = os.path.dirname(os.path.abspath(__file__))
     10    version_file = os.path.join(this_file_dir, '..', '..', 'VERSION')
     11
     12    if not os.path.isfile(version_file):
     13        raise SystemError("VERSION file not found.")
     14
     15    for l in open(version_file).readlines():
     16        #exec (l.strip())
     17        if l.startswith('AUBIO_MAJOR_VERSION'):
     18            AUBIO_MAJOR_VERSION = int(l.split('=')[1])
     19        if l.startswith('AUBIO_MINOR_VERSION'):
     20            AUBIO_MINOR_VERSION = int(l.split('=')[1])
     21        if l.startswith('AUBIO_PATCH_VERSION'):
     22            AUBIO_PATCH_VERSION = int(l.split('=')[1])
     23        if l.startswith('AUBIO_VERSION_STATUS'):
     24            AUBIO_VERSION_STATUS = l.split('=')[1].strip()[1:-1]
     25
     26    if AUBIO_MAJOR_VERSION is None or AUBIO_MINOR_VERSION is None \
     27            or AUBIO_PATCH_VERSION is None:
     28        raise SystemError("Failed parsing VERSION file.")
     29
     30    verstr = '.'.join(map(str, [AUBIO_MAJOR_VERSION,
     31                                     AUBIO_MINOR_VERSION,
     32                                     AUBIO_PATCH_VERSION]))
     33
     34    if AUBIO_VERSION_STATUS is not None:
     35        verstr += AUBIO_VERSION_STATUS
     36    return verstr
     37
     38def get_aubio_pyversion():
     39    # convert to version for python according to pep 440
     40    # see https://www.python.org/dev/peps/pep-0440/
     41    verstr = get_aubio_version()
     42    if '~alpha' in verstr:
     43        verstr = verstr.split('~')[0] + 'a1'
     44    # TODO: add rc, .dev, and .post suffixes, add numbering
     45    return verstr
    846
    947# inspired from https://gist.github.com/abergmeier/9488990
     
    5694    ext.libraries += ['aubio']
    5795
    58 def add_local_aubio_sources(ext):
     96def add_local_aubio_sources(ext, usedouble = False):
    5997    """ build aubio inside python module instead of linking against libaubio """
    6098    print("Info: libaubio was not installed or built locally with waf, adding src/")
     
    64102
    65103def add_local_macros(ext, usedouble = False):
    66     if usedouble:
    67         ext.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
    68104    # define macros (waf puts them in build/src/config.h)
    69105    for define_macro in ['HAVE_STDLIB_H', 'HAVE_STDIO_H',
     
    161197    def build_extension(self, extension):
    162198        if self.enable_double or 'HAVE_AUBIO_DOUBLE' in os.environ:
     199            extension.define_macros += [('HAVE_AUBIO_DOUBLE', 1)]
    163200            enable_double = True
    164201        else:
     
    171208            if os.path.isfile(os.path.join('src', 'aubio.h')):
    172209                add_local_aubio_header(extension)
    173             add_local_macros(extension, usedouble=enable_double)
     210            add_local_macros(extension)
    174211            # look for a local waf build
    175212            if os.path.isfile(os.path.join('build','src', 'fvec.c.1.o')):
     
    179216                add_external_deps(extension, usedouble=enable_double)
    180217                # add libaubio sources and look for optional deps with pkg-config
    181                 add_local_aubio_sources(extension)
     218                add_local_aubio_sources(extension, usedouble=enable_double)
    182219        # generate files python/gen/*.c, python/gen/aubio-generated.h
    183         extension.include_dirs += [ output_path ]
    184220        extension.sources += generate_external(header, output_path, overwrite = False,
    185221                usedouble=enable_double)
  • python/tests/test_sink.py

    rfbafd2c rf8d96f1  
    118118
    119119    def test_read_with(self):
    120         samplerate = 44100
    121         sink_path = get_tmp_sink_path()
     120        sink_path =get_tmp_sink_path()
    122121        vec = fvec(128)
    123122        with sink(sink_path, samplerate) as g:
    124             for _ in range(10):
     123            for i in range(10):
    125124                g(vec, 128)
    126125
  • python/tests/test_source.py

    rfbafd2c rf8d96f1  
    66from aubio import source
    77from .utils import list_all_sounds
     8import numpy as np
    89
    910import warnings
  • setup.py

    rfbafd2c rf8d96f1  
    33import sys, os.path, glob
    44from setuptools import setup, Extension
    5 from python.lib.moresetuptools import build_ext, CleanGenerated
     5from python.lib.moresetuptools import *
    66# function to generate gen/*.{c,h}
    7 from this_version import get_aubio_version, get_aubio_pyversion
     7from python.lib.gen_external import generate_external, header, output_path
    88
    99__version__ = get_aubio_pyversion()
    10 __aubio_version__ = get_aubio_version()
    1110
    1211include_dirs = []
    1312library_dirs = []
    14 define_macros = [('AUBIO_VERSION', '%s' % __aubio_version__)]
     13define_macros = [('AUBIO_VERSION', '%s' % __version__)]
    1514extra_link_args = []
    1615
    1716include_dirs += [ 'python/ext' ]
     17include_dirs += [ output_path ] # aubio-generated.h
    1818try:
    1919    import numpy
     
    5858    packages = ['aubio'],
    5959    package_dir = {'aubio':'python/lib/aubio'},
     60    scripts = ['python/scripts/aubiocut'],
    6061    ext_modules = [aubio_extension],
    6162    description = 'a collection of tools for music analysis',
     
    7576        'build_ext': build_ext,
    7677        },
    77     entry_points = {
    78         'console_scripts': [
    79             'aubio = aubio.cmd:main',
    80             'aubiocut = aubio.cut:main',
    81         ],
    82     },
    8378    test_suite = 'nose2.collector.collector',
    8479    extras_require = {
  • src/io/source_avcodec.c

    rfbafd2c rf8d96f1  
    406406  if (ret < 0) {
    407407    if (ret == AVERROR(EAGAIN)) {
    408       //AUBIO_WRN("source_avcodec: output is not available right now - user must try to send new input\n");
    409       goto beach;
     408      AUBIO_WRN("source_avcodec: output is not available right now - user must try to send new input\n");
    410409    } else if (ret == AVERROR_EOF) {
    411410      AUBIO_WRN("source_avcodec: the decoder has been fully flushed, and there will be no more output frames\n");
  • wscript

    rfbafd2c rf8d96f1  
    1515APPNAME = 'aubio'
    1616
    17 from this_version import *
    18 
    19 VERSION = get_aubio_version()
    20 LIB_VERSION = get_libaubio_version()
     17# source VERSION
     18for l in open('VERSION').readlines(): exec (l.strip())
     19
     20VERSION = '.'.join ([str(x) for x in [
     21    AUBIO_MAJOR_VERSION,
     22    AUBIO_MINOR_VERSION,
     23    AUBIO_PATCH_VERSION
     24    ]]) + AUBIO_VERSION_STATUS
     25
     26LIB_VERSION = '.'.join ([str(x) for x in [
     27    LIBAUBIO_LT_CUR,
     28    LIBAUBIO_LT_REV,
     29    LIBAUBIO_LT_AGE]])
    2130
    2231top = '.'
     
    259268        # one of fftwf or fftw3f
    260269        if (ctx.options.enable_fftw3f != False):
    261             ctx.check_cfg(package = 'fftw3f',
    262                     args = '--cflags --libs fftw3f >= 3.0.0',
     270            ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
     271                    args = '--cflags --libs',
    263272                    mandatory = ctx.options.enable_fftw3f)
    264273            if (ctx.options.enable_double == True):
     
    269278            # enable_double
    270279            if (ctx.options.enable_double == True):
    271                 ctx.check_cfg(package = 'fftw3',
    272                         args = '--cflags --libs fftw3 >= 3.0.0.',
    273                         mandatory = ctx.options.enable_fftw3)
     280                ctx.check_cfg(package = 'fftw3', atleast_version = '3.0.0',
     281                        args = '--cflags --libs', mandatory =
     282                        ctx.options.enable_fftw3)
    274283            else:
    275                 ctx.check_cfg(package = 'fftw3f',
    276                         args = '--cflags --libs fftw3f >= 3.0.0',
     284                ctx.check_cfg(package = 'fftw3f', atleast_version = '3.0.0',
     285                        args = '--cflags --libs',
    277286                        mandatory = ctx.options.enable_fftw3)
    278287        ctx.define('HAVE_FFTW3', 1)
     
    290299    # check for libsndfile
    291300    if (ctx.options.enable_sndfile != False):
    292         ctx.check_cfg(package = 'sndfile',
    293                 args = '--cflags --libs sndfile >= 1.0.4',
     301        ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4',
     302                args = '--cflags --libs',
    294303                mandatory = ctx.options.enable_sndfile)
    295304
     
    303312                    color = 'YELLOW')
    304313    if (ctx.options.enable_samplerate != False):
    305         ctx.check_cfg(package = 'samplerate',
    306                 args = '--cflags --libs samplerate >= 0.0.15',
     314        ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15',
     315                args = '--cflags --libs',
    307316                mandatory = ctx.options.enable_samplerate)
    308317
     
    321330    # check for libav
    322331    if (ctx.options.enable_avcodec != False):
    323         ctx.check_cfg(package = 'libavcodec',
    324                 args = '--cflags --libs libavcodec >= 54.35.0',
    325                 uselib_store = 'AVCODEC',
     332        ctx.check_cfg(package = 'libavcodec', atleast_version = '54.35.0',
     333                args = '--cflags --libs', uselib_store = 'AVCODEC',
    326334                mandatory = ctx.options.enable_avcodec)
    327         ctx.check_cfg(package = 'libavformat',
    328                 args = '--cflags --libs libavformat >= 52.3.0',
    329                 uselib_store = 'AVFORMAT',
     335        ctx.check_cfg(package = 'libavformat', atleast_version = '52.3.0',
     336                args = '--cflags --libs', uselib_store = 'AVFORMAT',
    330337                mandatory = ctx.options.enable_avcodec)
    331         ctx.check_cfg(package = 'libavutil',
    332                 args = '--cflags --libs libavutil >= 52.3.0',
    333                 uselib_store = 'AVUTIL',
     338        ctx.check_cfg(package = 'libavutil', atleast_version = '52.3.0',
     339                args = '--cflags --libs', uselib_store = 'AVUTIL',
    334340                mandatory = ctx.options.enable_avcodec)
    335         ctx.check_cfg(package = 'libswresample',
    336                 args = '--cflags --libs libswresample >= 2.3.0',
    337                 uselib_store = 'SWRESAMPLE',
     341        ctx.check_cfg(package = 'libswresample', atleast_version = '2.3.0',
     342                args = '--cflags --libs', uselib_store = 'SWRESAMPLE',
    338343                mandatory = False)
    339344        if 'HAVE_SWRESAMPLE' not in ctx.env:
    340             ctx.check_cfg(package = 'libavresample',
    341                     args = '--cflags --libs libavresample >= 1.0.1',
    342                     uselib_store = 'AVRESAMPLE',
     345            ctx.check_cfg(package = 'libavresample', atleast_version = '1.0.1',
     346                    args = '--cflags --libs', uselib_store = 'AVRESAMPLE',
    343347                    mandatory = False)
    344348
Note: See TracChangeset for help on using the changeset viewer.