Changeset c6388f4 for python/ext/aubiomodule.c
- Timestamp:
- Apr 24, 2016, 11:45:45 PM (8 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:
- fbcee4f
- Parents:
- 81984a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/ext/aubiomodule.c
r81984a7 rc6388f4 88 88 PyObject *result; 89 89 90 if (!PyArg_ParseTuple (args, "O f:alpha_norm", &input, &alpha)) {90 if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR ":alpha_norm", &input, &alpha)) { 91 91 return NULL; 92 92 } … … 101 101 102 102 // compute the function 103 result = Py_BuildValue ( "f", fvec_alpha_norm (&vec, alpha));103 result = Py_BuildValue (AUBIO_NPY_SMPL_CHR, fvec_alpha_norm (&vec, alpha)); 104 104 if (result == NULL) { 105 105 return NULL; … … 115 115 smpl_t output; 116 116 117 if (!PyArg_ParseTuple (args, "| fff", &input, &samplerate, &fftsize)) {117 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR , &input, &samplerate, &fftsize)) { 118 118 return NULL; 119 119 } … … 130 130 smpl_t output; 131 131 132 if (!PyArg_ParseTuple (args, "| fff", &input, &samplerate, &fftsize)) {132 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR , &input, &samplerate, &fftsize)) { 133 133 return NULL; 134 134 } … … 145 145 smpl_t output; 146 146 147 if (!PyArg_ParseTuple (args, "| fff", &input, &samplerate, &fftsize)) {147 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) { 148 148 return NULL; 149 149 } … … 160 160 smpl_t output; 161 161 162 if (!PyArg_ParseTuple (args, "| fff", &input, &samplerate, &fftsize)) {162 if (!PyArg_ParseTuple (args, "|" AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR AUBIO_NPY_SMPL_CHR, &input, &samplerate, &fftsize)) { 163 163 return NULL; 164 164 } … … 189 189 190 190 // compute the function 191 result = Py_BuildValue ( "f", aubio_zero_crossing_rate (&vec));191 result = Py_BuildValue (AUBIO_NPY_SMPL_CHR, aubio_zero_crossing_rate (&vec)); 192 192 if (result == NULL) { 193 193 return NULL; … … 309 309 PyModule_AddObject (m, "sink", (PyObject *) & Py_sinkType); 310 310 311 PyModule_AddStringConstant(m, "float_type", AUBIO_NPY_SMPL_STR); 312 311 313 // add generated objects 312 314 add_generated_objects(m);
Note: See TracChangeset
for help on using the changeset viewer.