Changeset 3c6f584


Ignore:
Timestamp:
Aug 20, 2015, 1:15:54 PM (9 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:
0309a22
Parents:
e3e8e9d
Message:

src/spectral/fft.c: if Ooura is used, make sure the fft size is a power of two

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/fft.c

    re3e8e9d r3c6f584  
    168168#endif
    169169#else                         // using OOURA
     170  if (aubio_is_power_of_two(winsize) != 1) {
     171    AUBIO_ERR("fft: can only create with sizes power of two,"
     172              " requested %d\n", winsize);
     173    return NULL;
     174  }
    170175  s->winsize = winsize;
    171176  s->fft_size = winsize / 2 + 1;
  • tests/src/spectral/test-fft.c

    re3e8e9d r3c6f584  
    33int main (void)
    44{
     5  int return_code = 0;
    56  uint_t i, n_iters = 100; // number of iterations
    67  uint_t win_s = 500; // window size
     
    1011  // create fft object
    1112  aubio_fft_t * fft = new_aubio_fft(win_s);
     13
     14  if (!fft) {
     15    return_code = 1;
     16    goto beach;
     17  }
    1218
    1319  // fill input with some data
     
    3440  //fvec_print(out);
    3541  del_aubio_fft(fft);
     42beach:
    3643  del_fvec(in);
    3744  del_cvec(fftgrain);
    3845  del_fvec(out);
    3946  aubio_cleanup();
    40   return 0;
     47  return return_code;
    4148}
Note: See TracChangeset for help on using the changeset viewer.