Changeset ed80243


Ignore:
Timestamp:
Dec 6, 2018, 1:17:47 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/timestretch, fix/ffmpeg5, master
Children:
dd47431
Parents:
d726526
Message:

[awhitening] use shortest length available (closes gh-216)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/awhitening.c

    rd726526 red80243  
    4444{
    4545  uint_t i = 0;
    46   for (i = 0; i < o->peak_values->length; i++) {
     46  uint_t length = MIN(fftgrain->length, o->peak_values->length);
     47  for (i = 0; i < length; i++) {
    4748    smpl_t tmp = MAX(o->r_decay * o->peak_values->data[i], o->floor);
    4849    o->peak_values->data[i] = MAX(fftgrain->norm[i], tmp);
Note: See TracChangeset for help on using the changeset viewer.