Changeset 1ec59e4


Ignore:
Timestamp:
Jun 29, 2019, 1:35:40 PM (4 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink
Parents:
7abefed (diff), 2244f00 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/autosink

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • .travis.yml

    r7abefed r1ec59e4  
    3939      os: osx
    4040      compiler: clang
    41       env: WAFOPTS="--enable-fat --disable-avcodec --disable-sndfile --disable-vorbis --disable-flac"
     41      env: WAFOPTS="--enable-fat --disable-avcodec --disable-sndfile --disable-samplerate --disable-vorbis --disable-flac"
    4242    - language: C
    4343      os: osx
    4444      compiler: clang
    45       env: WAFOPTS="--with-target-platform=ios --disable-avcodec --disable-sndfile --disable-vorbis --disable-flac" AUBIO_NOTESTS=1
     45      env: WAFOPTS="--with-target-platform=ios --disable-avcodec --disable-sndfile --disable-samplerate --disable-vorbis --disable-flac" AUBIO_NOTESTS=1
    4646    - language: C
    4747      os: osx
    4848      compiler: clang
    49       env: WAFOPTS="--with-target-platform=iosimulator --disable-avcodec --disable-sndfile --disable-vorbis --disable-flac" AUBIO_NOTESTS=1
     49      env: WAFOPTS="--with-target-platform=iosimulator --disable-avcodec --disable-sndfile --disable-samplerate --disable-vorbis --disable-flac" AUBIO_NOTESTS=1
    5050
    5151# use trusty
     
    7878    - flac
    7979    - lcov
    80     #update: true
     80    update: true
    8181
    8282before_install:
  • doc/binaries.rst

    r7abefed r1ec59e4  
    99`windows <https://aubio.org/download#win>`_
    1010
     11For Windows, aubio is also available from `vcpkg
     12<https://vcpkg.readthedocs.io/en/latest/examples/installing-and-using-packages/>`_.
     13
    1114To use aubio in a macOS or iOS application, see :ref:`xcode-frameworks-label`.
    1215
  • python/ext/aubio-docstrings.h

    r7abefed r1ec59e4  
    22    "dct(size=1024)\n"\
    33    "\n"\
    4     "Compute Discrete Fourier Transorms of Type-II.\n"\
     4    "Compute Discrete Fourier Transforms of Type-II.\n"\
    55    "\n"\
    66    "Parameters\n"\
  • python/ext/py-fft.c

    r7abefed r1ec59e4  
    44"fft(size=1024)\n"
    55"\n"
    6 "Compute Fast Fourier Transorms.\n"
     6"Compute Fast Fourier Transforms.\n"
    77"\n"
    88"Parameters\n"
  • python/ext/py-filter.c

    r7abefed r1ec59e4  
    157157  err = aubio_filter_set_c_weighting (self->o, samplerate);
    158158  if (err > 0) {
    159     PyErr_SetString (PyExc_ValueError,
    160         "error when setting filter to C-weighting");
     159    if (PyErr_Occurred() == NULL) {
     160      PyErr_SetString (PyExc_ValueError,
     161          "error when setting filter to C-weighting");
     162    } else {
     163      // change the RuntimeError into ValueError
     164      PyObject *type, *value, *traceback;
     165      PyErr_Fetch(&type, &value, &traceback);
     166      Py_XDECREF(type);
     167      type = PyExc_ValueError;
     168      Py_XINCREF(type);
     169      PyErr_Restore(type, value, traceback);
     170    }
    161171    return NULL;
    162172  }
     
    175185  err = aubio_filter_set_a_weighting (self->o, samplerate);
    176186  if (err > 0) {
    177     PyErr_SetString (PyExc_ValueError,
    178         "error when setting filter to A-weighting");
     187    if (PyErr_Occurred() == NULL) {
     188      PyErr_SetString (PyExc_ValueError,
     189          "error when setting filter to A-weighting");
     190    } else {
     191      // change the RuntimeError into ValueError
     192      PyObject *type, *value, *traceback;
     193      PyErr_Fetch(&type, &value, &traceback);
     194      Py_XDECREF(type);
     195      type = PyExc_ValueError;
     196      Py_XINCREF(type);
     197      PyErr_Restore(type, value, traceback);
     198    }
    179199    return NULL;
    180200  }
     
    193213  err = aubio_filter_set_biquad (self->o, b0, b1, b2, a1, a2);
    194214  if (err > 0) {
    195     PyErr_SetString (PyExc_ValueError,
    196         "error when setting filter with biquad coefficients");
     215    if (PyErr_Occurred() == NULL) {
     216      PyErr_SetString (PyExc_ValueError,
     217          "error when setting filter with biquad coefficients");
     218    } else {
     219      // change the RuntimeError into ValueError
     220      PyObject *type, *value, *traceback;
     221      PyErr_Fetch(&type, &value, &traceback);
     222      Py_XDECREF(type);
     223      type = PyExc_ValueError;
     224      Py_XINCREF(type);
     225      PyErr_Restore(type, value, traceback);
     226    }
    197227    return NULL;
    198228  }
  • python/ext/py-filterbank.c

    r7abefed r1ec59e4  
    327327      PyObject *type, *value, *traceback;
    328328      PyErr_Fetch(&type, &value, &traceback);
    329       PyErr_Restore(PyExc_ValueError, value, traceback);
     329      Py_XDECREF(type);
     330      type = PyExc_ValueError;
     331      Py_XINCREF(type);
     332      PyErr_Restore(type, value, traceback);
    330333    }
    331334    return NULL;
     
    352355      PyObject *type, *value, *traceback;
    353356      PyErr_Fetch(&type, &value, &traceback);
    354       PyErr_Restore(PyExc_ValueError, value, traceback);
     357      Py_XDECREF(type);
     358      type = PyExc_ValueError;
     359      Py_XINCREF(type);
     360      PyErr_Restore(type, value, traceback);
    355361    }
    356362    return NULL;
     
    381387      PyObject *type, *value, *traceback;
    382388      PyErr_Fetch(&type, &value, &traceback);
    383       PyErr_Restore(PyExc_ValueError, value, traceback);
     389      Py_XDECREF(type);
     390      type = PyExc_ValueError;
     391      Py_XINCREF(type);
     392      PyErr_Restore(type, value, traceback);
    384393    }
    385394    return NULL;
     
    410419      PyObject *type, *value, *traceback;
    411420      PyErr_Fetch(&type, &value, &traceback);
    412       PyErr_Restore(PyExc_ValueError, value, traceback);
     421      Py_XDECREF(type);
     422      type = PyExc_ValueError;
     423      Py_XINCREF(type);
     424      PyErr_Restore(type, value, traceback);
    413425    }
    414426    return NULL;
     
    464476      PyObject *type, *value, *traceback;
    465477      PyErr_Fetch(&type, &value, &traceback);
    466       PyErr_Restore(PyExc_ValueError, value, traceback);
     478      Py_XDECREF(type);
     479      type = PyExc_ValueError;
     480      Py_XINCREF(type);
     481      PyErr_Restore(type, value, traceback);
    467482    }
    468483    return NULL;
     
    494509      PyObject *type, *value, *traceback;
    495510      PyErr_Fetch(&type, &value, &traceback);
    496       PyErr_Restore(PyExc_ValueError, value, traceback);
     511      Py_XDECREF(type);
     512      type = PyExc_ValueError;
     513      Py_XINCREF(type);
     514      PyErr_Restore(type, value, traceback);
    497515    }
    498516    return NULL;
  • python/ext/py-sink.c

    r7abefed r1ec59e4  
    8282"\n"
    8383"By default, the sink will be closed before being deleted.\n"
    84 "Explicitely closing a sink can be useful to control the number\n"
     84"Explicitly closing a sink can be useful to control the number\n"
    8585"of files simultaneously opened.\n"
    8686"";
  • python/lib/gen_code.py

    r7abefed r1ec59e4  
    510510      PyObject *type, *value, *traceback;
    511511      PyErr_Fetch(&type, &value, &traceback);
    512       PyErr_Restore(PyExc_ValueError, value, traceback);
     512      Py_XDECREF(type);
     513      type = PyExc_ValueError;
     514      Py_XINCREF(type);
     515      PyErr_Restore(type, value, traceback);
    513516    }}
    514517    return NULL;
  • python/tests/test_hztomel.py

    r7abefed r1ec59e4  
    55from numpy.testing import assert_equal, assert_almost_equal
    66from _tools import assert_warns
     7from utils import is32bit
    78import numpy as np
    89import aubio
     
    1011from aubio import hztomel, meltohz
    1112from aubio import hztomel_htk, meltohz_htk
    12 
    1313
    1414class aubio_hztomel_test_case(TestCase):
     
    1818        assert_almost_equal(hztomel(400. / 3.), 2., decimal=5)
    1919        assert_almost_equal(hztomel(1000. / 3), 5.)
    20         assert_equal(hztomel(200.), 3.)
     20        # on 32bit, some of these tests fails unless compiling with -ffloat-store
     21        try:
     22            assert_equal(hztomel(200.), 3.)
     23        except AssertionError:
     24            if not is32bit(): raise
     25            assert_almost_equal(hztomel(200.), 3., decimal=5)
    2126        assert_almost_equal(hztomel(1000.), 15)
    22         assert_almost_equal(hztomel(6400), 42)
    23         assert_almost_equal(hztomel(40960), 69)
     27        assert_almost_equal(hztomel(6400), 42, decimal=5)
     28        assert_almost_equal(hztomel(40960), 69, decimal=5)
    2429
    2530        for m in np.linspace(0, 1000, 100):
     
    2934        assert_equal(meltohz(0.), 0.)
    3035        assert_almost_equal(meltohz(2), 400. / 3., decimal=4)
    31         assert_equal(meltohz(3.), 200.)
     36        try:
     37            assert_equal(meltohz(3.), 200.)
     38        except AssertionError:
     39            if not is32bit(): raise
     40            assert_almost_equal(meltohz(3.), 200., decimal=5)
    3241        assert_almost_equal(meltohz(5), 1000. / 3., decimal=4)
    3342        assert_almost_equal(meltohz(15), 1000., decimal=4)
  • python/tests/test_phasevoc.py

    r7abefed r1ec59e4  
    22
    33from numpy.testing import TestCase, assert_equal, assert_array_less
    4 from _tools import parametrize
     4from _tools import parametrize, skipTest
    55from aubio import fvec, cvec, pvoc, float_type
    66import numpy as np
     
    5252                assert_equal (s.phas[s.phas < 0], -np.pi)
    5353                assert_equal (np.abs(s.phas[np.abs(s.phas) != np.pi]), 0)
    54                 self.skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \
     54                skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \
    5555                        + 'This is expected when using fftw3 on powerpc.')
    5656            assert_equal ( r, 0.)
  • python/tests/utils.py

    r7abefed r1ec59e4  
    44import re
    55import glob
     6import struct
    67import numpy as np
    78from tempfile import mkstemp
    89
    910DEFAULT_SOUND = '22050Hz_5s_brownnoise.wav'
     11
     12def is32bit():
     13    return struct.calcsize("P") * 8 == 32
    1014
    1115def array_from_text_file(filename, dtype = 'float'):
  • scripts/get_waf.sh

    r7abefed r1ec59e4  
    44#set -x
    55
    6 WAFVERSION=2.0.14
     6WAFVERSION=2.0.17
    77WAFTARBALL=waf-$WAFVERSION.tar.bz2
    88WAFURL=https://waf.io/$WAFTARBALL
Note: See TracChangeset for help on using the changeset viewer.