Ignore:
Timestamp:
Apr 24, 2016, 11:45:45 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
fbcee4f
Parents:
81984a7
Message:

python/{ext,lib}: prepare for double precision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-musicutils.c

    r81984a7 rc6388f4  
    4242  }
    4343
    44   level_lin = Py_BuildValue("f", aubio_level_lin(&vec));
     44  level_lin = Py_BuildValue(AUBIO_NPY_SMPL_CHR, aubio_level_lin(&vec));
    4545  if (level_lin == NULL) {
    4646    PyErr_SetString (PyExc_ValueError, "failed computing level_lin");
     
    7171  }
    7272
    73   db_spl = Py_BuildValue("f", aubio_db_spl(&vec));
     73  db_spl = Py_BuildValue(AUBIO_NPY_SMPL_CHR, aubio_db_spl(&vec));
    7474  if (db_spl == NULL) {
    7575    PyErr_SetString (PyExc_ValueError, "failed computing db_spl");
     
    8888  smpl_t threshold;
    8989
    90   if (!PyArg_ParseTuple (args, "Of:silence_detection", &input, &threshold)) {
     90  if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR ":silence_detection", &input, &threshold)) {
    9191    PyErr_SetString (PyExc_ValueError, "failed parsing arguments");
    9292    return NULL;
     
    118118  smpl_t threshold;
    119119
    120   if (!PyArg_ParseTuple (args, "Of:level_detection", &input, &threshold)) {
     120  if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR ":level_detection", &input, &threshold)) {
    121121    PyErr_SetString (PyExc_ValueError, "failed parsing arguments");
    122122    return NULL;
     
    131131  }
    132132
    133   level_detection = Py_BuildValue("f", aubio_level_detection(&vec, threshold));
     133  level_detection = Py_BuildValue(AUBIO_NPY_SMPL_CHR, aubio_level_detection(&vec, threshold));
    134134  if (level_detection == NULL) {
    135135    PyErr_SetString (PyExc_ValueError, "failed computing level_detection");
Note: See TracChangeset for help on using the changeset viewer.