Changeset 9ef3c6e


Ignore:
Timestamp:
Nov 9, 2018, 7:14:26 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:
01d4d19, 22ec93a, 893e699
Parents:
693de50
Message:

[filterbank] add a warning for duplicate freqs, improve nyquist warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/filterbank_mel.c

    r693de50 r9ef3c6e  
    6161    } else if (freqs->data[fn] > samplerate / 2) {
    6262      AUBIO_WRN("filterbank_mel: freqs should contain only "
    63           "values > samplerate / 2.\n");
     63          "values < samplerate / 2.\n");
    6464    } else if (fn > 0 && freqs->data[fn] < freqs->data[fn-1]) {
    6565      AUBIO_ERR("filterbank_mel: freqs should be a list of frequencies "
    6666          "sorted from low to high, but freq[%d] < freq[%d-1]\n", fn, fn);
    6767      return AUBIO_FAIL;
     68    } else if (fn > 0 && freqs->data[fn] == freqs->data[fn-1]) {
     69      AUBIO_WRN("filterbank_mel: set_triangle_bands received a list "
     70          "with twice the frequency %f\n", freqs->data[fn]);
    6871    }
    6972  }
Note: See TracChangeset for help on using the changeset viewer.