Changeset 4615886a for python/ext
- Timestamp:
- Jul 10, 2015, 2:08:22 AM (9 years ago)
- 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:
- 665b711
- Parents:
- 5a7e2c3
- Location:
- python/ext
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubiomodule.c
r5a7e2c3 r4615886a 242 242 {"min_removal", Py_min_removal, METH_VARARGS, Py_min_removal_doc}, 243 243 {"level_lin", Py_aubio_level_lin, METH_VARARGS, Py_aubio_level_lin_doc}, 244 {"db_spl", Py_aubio_db_spl, METH_VARARGS, Py_aubio_db_spl_doc}, 244 245 {"window", Py_aubio_window, METH_VARARGS, Py_aubio_window_doc}, 245 246 {NULL, NULL} /* Sentinel */ -
python/ext/py-musicutils.c
r5a7e2c3 r4615886a 51 51 return level_lin; 52 52 } 53 54 PyObject * 55 Py_aubio_db_spl(PyObject *self, PyObject *args) 56 { 57 PyObject *input; 58 fvec_t *vec; 59 PyObject *db_spl; 60 61 if (!PyArg_ParseTuple (args, "O:db_spl", &input)) { 62 PyErr_SetString (PyExc_ValueError, "failed parsing arguments"); 63 return NULL; 64 } 65 66 if (input == NULL) { 67 return NULL; 68 } 69 70 vec = PyAubio_ArrayToCFvec (input); 71 if (vec == NULL) { 72 return NULL; 73 } 74 75 db_spl = Py_BuildValue("f", aubio_db_spl(vec)); 76 if (db_spl == NULL) { 77 PyErr_SetString (PyExc_ValueError, "failed computing db_spl"); 78 return NULL; 79 } 80 81 return db_spl; 82 }
Note: See TracChangeset
for help on using the changeset viewer.