Changes in / [1ec59e4:7abefed]
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified .travis.yml ¶
r1ec59e4 r7abefed 39 39 os: osx 40 40 compiler: clang 41 env: WAFOPTS="--enable-fat --disable-avcodec --disable-sndfile --disable- samplerate --disable-vorbis --disable-flac"41 env: WAFOPTS="--enable-fat --disable-avcodec --disable-sndfile --disable-vorbis --disable-flac" 42 42 - language: C 43 43 os: osx 44 44 compiler: clang 45 env: WAFOPTS="--with-target-platform=ios --disable-avcodec --disable-sndfile --disable- samplerate --disable-vorbis --disable-flac" AUBIO_NOTESTS=145 env: WAFOPTS="--with-target-platform=ios --disable-avcodec --disable-sndfile --disable-vorbis --disable-flac" AUBIO_NOTESTS=1 46 46 - language: C 47 47 os: osx 48 48 compiler: clang 49 env: WAFOPTS="--with-target-platform=iosimulator --disable-avcodec --disable-sndfile --disable- samplerate --disable-vorbis --disable-flac" AUBIO_NOTESTS=149 env: WAFOPTS="--with-target-platform=iosimulator --disable-avcodec --disable-sndfile --disable-vorbis --disable-flac" AUBIO_NOTESTS=1 50 50 51 51 # use trusty … … 78 78 - flac 79 79 - lcov 80 update: true80 #update: true 81 81 82 82 before_install: -
TabularUnified doc/binaries.rst ¶
r1ec59e4 r7abefed 9 9 `windows <https://aubio.org/download#win>`_ 10 10 11 For Windows, aubio is also available from `vcpkg12 <https://vcpkg.readthedocs.io/en/latest/examples/installing-and-using-packages/>`_.13 14 11 To use aubio in a macOS or iOS application, see :ref:`xcode-frameworks-label`. 15 12 -
TabularUnified python/ext/aubio-docstrings.h ¶
r1ec59e4 r7abefed 2 2 "dct(size=1024)\n"\ 3 3 "\n"\ 4 "Compute Discrete Fourier Trans forms of Type-II.\n"\4 "Compute Discrete Fourier Transorms of Type-II.\n"\ 5 5 "\n"\ 6 6 "Parameters\n"\ -
TabularUnified python/ext/py-fft.c ¶
r1ec59e4 r7abefed 4 4 "fft(size=1024)\n" 5 5 "\n" 6 "Compute Fast Fourier Trans forms.\n"6 "Compute Fast Fourier Transorms.\n" 7 7 "\n" 8 8 "Parameters\n" -
TabularUnified python/ext/py-filter.c ¶
r1ec59e4 r7abefed 157 157 err = aubio_filter_set_c_weighting (self->o, samplerate); 158 158 if (err > 0) { 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 } 159 PyErr_SetString (PyExc_ValueError, 160 "error when setting filter to C-weighting"); 171 161 return NULL; 172 162 } … … 185 175 err = aubio_filter_set_a_weighting (self->o, samplerate); 186 176 if (err > 0) { 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 } 177 PyErr_SetString (PyExc_ValueError, 178 "error when setting filter to A-weighting"); 199 179 return NULL; 200 180 } … … 213 193 err = aubio_filter_set_biquad (self->o, b0, b1, b2, a1, a2); 214 194 if (err > 0) { 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 } 195 PyErr_SetString (PyExc_ValueError, 196 "error when setting filter with biquad coefficients"); 227 197 return NULL; 228 198 } -
TabularUnified python/ext/py-filterbank.c ¶
r1ec59e4 r7abefed 327 327 PyObject *type, *value, *traceback; 328 328 PyErr_Fetch(&type, &value, &traceback); 329 Py_XDECREF(type); 330 type = PyExc_ValueError; 331 Py_XINCREF(type); 332 PyErr_Restore(type, value, traceback); 329 PyErr_Restore(PyExc_ValueError, value, traceback); 333 330 } 334 331 return NULL; … … 355 352 PyObject *type, *value, *traceback; 356 353 PyErr_Fetch(&type, &value, &traceback); 357 Py_XDECREF(type); 358 type = PyExc_ValueError; 359 Py_XINCREF(type); 360 PyErr_Restore(type, value, traceback); 354 PyErr_Restore(PyExc_ValueError, value, traceback); 361 355 } 362 356 return NULL; … … 387 381 PyObject *type, *value, *traceback; 388 382 PyErr_Fetch(&type, &value, &traceback); 389 Py_XDECREF(type); 390 type = PyExc_ValueError; 391 Py_XINCREF(type); 392 PyErr_Restore(type, value, traceback); 383 PyErr_Restore(PyExc_ValueError, value, traceback); 393 384 } 394 385 return NULL; … … 419 410 PyObject *type, *value, *traceback; 420 411 PyErr_Fetch(&type, &value, &traceback); 421 Py_XDECREF(type); 422 type = PyExc_ValueError; 423 Py_XINCREF(type); 424 PyErr_Restore(type, value, traceback); 412 PyErr_Restore(PyExc_ValueError, value, traceback); 425 413 } 426 414 return NULL; … … 476 464 PyObject *type, *value, *traceback; 477 465 PyErr_Fetch(&type, &value, &traceback); 478 Py_XDECREF(type); 479 type = PyExc_ValueError; 480 Py_XINCREF(type); 481 PyErr_Restore(type, value, traceback); 466 PyErr_Restore(PyExc_ValueError, value, traceback); 482 467 } 483 468 return NULL; … … 509 494 PyObject *type, *value, *traceback; 510 495 PyErr_Fetch(&type, &value, &traceback); 511 Py_XDECREF(type); 512 type = PyExc_ValueError; 513 Py_XINCREF(type); 514 PyErr_Restore(type, value, traceback); 496 PyErr_Restore(PyExc_ValueError, value, traceback); 515 497 } 516 498 return NULL; -
TabularUnified python/ext/py-sink.c ¶
r1ec59e4 r7abefed 82 82 "\n" 83 83 "By default, the sink will be closed before being deleted.\n" 84 "Explicit ly closing a sink can be useful to control the number\n"84 "Explicitely closing a sink can be useful to control the number\n" 85 85 "of files simultaneously opened.\n" 86 86 ""; -
TabularUnified python/lib/gen_code.py ¶
r1ec59e4 r7abefed 510 510 PyObject *type, *value, *traceback; 511 511 PyErr_Fetch(&type, &value, &traceback); 512 Py_XDECREF(type); 513 type = PyExc_ValueError; 514 Py_XINCREF(type); 515 PyErr_Restore(type, value, traceback); 512 PyErr_Restore(PyExc_ValueError, value, traceback); 516 513 }} 517 514 return NULL; -
TabularUnified python/tests/test_hztomel.py ¶
r1ec59e4 r7abefed 5 5 from numpy.testing import assert_equal, assert_almost_equal 6 6 from _tools import assert_warns 7 from utils import is32bit8 7 import numpy as np 9 8 import aubio … … 11 10 from aubio import hztomel, meltohz 12 11 from aubio import hztomel_htk, meltohz_htk 12 13 13 14 14 class aubio_hztomel_test_case(TestCase): … … 18 18 assert_almost_equal(hztomel(400. / 3.), 2., decimal=5) 19 19 assert_almost_equal(hztomel(1000. / 3), 5.) 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) 20 assert_equal(hztomel(200.), 3.) 26 21 assert_almost_equal(hztomel(1000.), 15) 27 assert_almost_equal(hztomel(6400), 42 , decimal=5)28 assert_almost_equal(hztomel(40960), 69 , decimal=5)22 assert_almost_equal(hztomel(6400), 42) 23 assert_almost_equal(hztomel(40960), 69) 29 24 30 25 for m in np.linspace(0, 1000, 100): … … 34 29 assert_equal(meltohz(0.), 0.) 35 30 assert_almost_equal(meltohz(2), 400. / 3., decimal=4) 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) 31 assert_equal(meltohz(3.), 200.) 41 32 assert_almost_equal(meltohz(5), 1000. / 3., decimal=4) 42 33 assert_almost_equal(meltohz(15), 1000., decimal=4) -
TabularUnified python/tests/test_phasevoc.py ¶
r1ec59e4 r7abefed 2 2 3 3 from numpy.testing import TestCase, assert_equal, assert_array_less 4 from _tools import parametrize , skipTest4 from _tools import parametrize 5 5 from aubio import fvec, cvec, pvoc, float_type 6 6 import numpy as np … … 52 52 assert_equal (s.phas[s.phas < 0], -np.pi) 53 53 assert_equal (np.abs(s.phas[np.abs(s.phas) != np.pi]), 0) 54 s kipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \54 self.skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \ 55 55 + 'This is expected when using fftw3 on powerpc.') 56 56 assert_equal ( r, 0.) -
TabularUnified python/tests/utils.py ¶
r1ec59e4 r7abefed 4 4 import re 5 5 import glob 6 import struct7 6 import numpy as np 8 7 from tempfile import mkstemp 9 8 10 9 DEFAULT_SOUND = '22050Hz_5s_brownnoise.wav' 11 12 def is32bit():13 return struct.calcsize("P") * 8 == 3214 10 15 11 def array_from_text_file(filename, dtype = 'float'): -
TabularUnified scripts/get_waf.sh ¶
r1ec59e4 r7abefed 4 4 #set -x 5 5 6 WAFVERSION=2.0.1 76 WAFVERSION=2.0.14 7 7 WAFTARBALL=waf-$WAFVERSION.tar.bz2 8 8 WAFURL=https://waf.io/$WAFTARBALL
Note: See TracChangeset
for help on using the changeset viewer.