Changeset 69dbe0a for src


Ignore:
Timestamp:
Nov 17, 2018, 2:14:41 PM (6 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
Children:
a380b73
Parents:
f6bfc26
Message:

[filterbank] check samplerate in _slaney, use temp variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank_mel.c

    rf6bfc26 r69dbe0a  
    173173  uint_t retval;
    174174
     175  if (samplerate <= 0) {
     176    AUBIO_ERR("filterbank: set_mel_coeffs_slaney samplerate should be > 0\n");
     177    return AUBIO_FAIL;
     178  }
     179
    175180  /* Malcolm Slaney parameters */
    176181  smpl_t lowestFrequency = 133.3333;
     
    240245  uint_t n_bands = coeffs->height;
    241246
    242   if (aubio_filterbank_check_freqs(fb, samplerate, &freq_min, &freq_max)) {
     247  if (aubio_filterbank_check_freqs(fb, samplerate, &start, &end)) {
    243248    return AUBIO_FAIL;
    244249  }
     
    272277  uint_t n_bands = coeffs->height;
    273278
    274   if (aubio_filterbank_check_freqs(fb, samplerate, &freq_min, &freq_max)) {
     279  if (aubio_filterbank_check_freqs(fb, samplerate, &start, &end)) {
    275280    return AUBIO_FAIL;
    276281  }
Note: See TracChangeset for help on using the changeset viewer.