Changeset 46243dd4 for src


Ignore:
Timestamp:
Sep 20, 2016, 11:13:53 AM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
Children:
b3f79ca
Parents:
ed9696f
Message:

src/effects/pitchshift.c: fix max_process_size, simplify warm-up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/effects/pitchshift.c

    red9696f r46243dd4  
    9696  //p->rboptions |= RubberBandOptionPitchHighConsistency;
    9797  p->rb = rubberband_new(samplerate, 1, p->rboptions, p->timeratio, p->pitchscale);
    98   rubberband_set_max_process_size(p->rb, p->hopsize * 4);
     98  rubberband_set_max_process_size(p->rb, p->hopsize);
    9999  //rubberband_set_debug_level(p->rb, 10);
    100100
    101101#if 1
    102102  // warm up rubber band
    103   unsigned int latency = 0; int available = 0;
    104   latency = MAX(rubberband_get_latency(p->rb), p->hopsize);
     103  unsigned int latency = MAX(p->hopsize, rubberband_get_latency(p->rb));
     104  int available = rubberband_available(p->rb);
    105105  fvec_t *zeros = new_fvec(p->hopsize);
    106   while (available <= (int)latency) {
     106  while (available <= latency) {
    107107    rubberband_process(p->rb, (const float* const*)&(zeros->data), p->hopsize, 0);
    108108    available = rubberband_available(p->rb);
Note: See TracChangeset for help on using the changeset viewer.