Changeset 4acee97


Ignore:
Timestamp:
Sep 29, 2016, 11:07:19 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
sampler, timestretch
Children:
0202028
Parents:
30efdd0
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

    r30efdd0 r4acee97  
    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.