- Timestamp:
- Dec 19, 2018, 5:14:59 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 0045668, 6a99bff
- Parents:
- df66c37
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/py-musicutils.c
rdf66c37 ra617bf3 40 40 } 41 41 42 level_lin = Py _BuildValue(AUBIO_NPY_SMPL_CHR,aubio_level_lin(&vec));42 level_lin = PyFloat_FromDouble(aubio_level_lin(&vec)); 43 43 if (level_lin == NULL) { 44 44 PyErr_SetString (PyExc_ValueError, "failed computing level_lin"); … … 68 68 } 69 69 70 db_spl = Py _BuildValue(AUBIO_NPY_SMPL_CHR,aubio_db_spl(&vec));70 db_spl = PyFloat_FromDouble(aubio_db_spl(&vec)); 71 71 if (db_spl == NULL) { 72 72 PyErr_SetString (PyExc_ValueError, "failed computing db_spl"); … … 97 97 } 98 98 99 silence_detection = Py _BuildValue("I",aubio_silence_detection(&vec, threshold));99 silence_detection = PyLong_FromLong(aubio_silence_detection(&vec, threshold)); 100 100 if (silence_detection == NULL) { 101 101 PyErr_SetString (PyExc_ValueError, "failed computing silence_detection"); … … 126 126 } 127 127 128 level_detection = Py _BuildValue(AUBIO_NPY_SMPL_CHR,aubio_level_detection(&vec, threshold));128 level_detection = PyFloat_FromDouble(aubio_level_detection(&vec, threshold)); 129 129 if (level_detection == NULL) { 130 130 PyErr_SetString (PyExc_ValueError, "failed computing level_detection");
Note: See TracChangeset
for help on using the changeset viewer.