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/aubiomodule.c

    r81984a7 rc6388f4  
    8888  PyObject *result;
    8989
    90   if (!PyArg_ParseTuple (args, "Of:alpha_norm", &input, &alpha)) {
     90  if (!PyArg_ParseTuple (args, "O" AUBIO_NPY_SMPL_CHR ":alpha_norm", &input, &alpha)) {
    9191    return NULL;
    9292  }
     
    101101
    102102  // 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));
    104104  if (result == NULL) {
    105105    return NULL;
     
    115115  smpl_t output;
    116116
    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)) {
    118118    return NULL;
    119119  }
     
    130130  smpl_t output;
    131131
    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)) {
    133133    return NULL;
    134134  }
     
    145145  smpl_t output;
    146146
    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)) {
    148148    return NULL;
    149149  }
     
    160160  smpl_t output;
    161161
    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)) {
    163163    return NULL;
    164164  }
     
    189189
    190190  // 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));
    192192  if (result == NULL) {
    193193    return NULL;
     
    309309  PyModule_AddObject (m, "sink", (PyObject *) & Py_sinkType);
    310310
     311  PyModule_AddStringConstant(m, "float_type", AUBIO_NPY_SMPL_STR);
     312
    311313  // add generated objects
    312314  add_generated_objects(m);
Note: See TracChangeset for help on using the changeset viewer.