Changeset 9bd769a


Ignore:
Timestamp:
Dec 7, 2018, 1:28:55 AM (12 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/timestretch
Children:
8856791
Parents:
992ac88
git-author:
Paul Brossier <piem@piem.org> (09/29/16 23:07:19)
git-committer:
Paul Brossier <piem@piem.org> (12/07/18 01:28:55)
Message:

src/effects/timestretch_rubberband.c: fix eof when last available == hopsize, change _set messages to warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/effects/timestretch_rubberband.c

    r992ac88 r9bd769a  
    137137    return AUBIO_OK;
    138138  } else {
    139     AUBIO_ERR("timestretch: could not set stretch ratio to %.2f\n", stretch);
     139    AUBIO_WRN("timestretch: could not set stretch ratio to %.2f\n", stretch);
    140140    return AUBIO_FAIL;
    141141  }
     
    156156    return AUBIO_OK;
    157157  } else {
    158     AUBIO_ERR("timestretch: could not set pitchscale to %.2f\n", pitchscale);
     158    AUBIO_WRN("timestretch: could not set pitchscale to %.2f\n", pitchscale);
    159159    return AUBIO_FAIL;
    160160  }
     
    174174    return aubio_timestretch_set_pitchscale(p, pitchscale);
    175175  } else {
    176     AUBIO_ERR("timestretch: could not set transpose to %.2f\n", transpose);
     176    AUBIO_WRN("timestretch: could not set transpose to %.2f\n", transpose);
    177177    return AUBIO_FAIL;
    178178  }
     
    210210    rubberband_retrieve(p->rb, (float* const*)&(out->data), p->hopsize);
    211211    *read = p->hopsize;
    212   } else {
     212  } else if (available > 0) {
    213213    rubberband_retrieve(p->rb, (float* const*)&(out->data), available);
    214214    *read = available;
     215  } else {
     216    fvec_zeros(out);
     217    *read = 0;
    215218  }
    216219}
Note: See TracChangeset for help on using the changeset viewer.