Changeset e467cf9
- Timestamp:
- Sep 19, 2016, 8:30:05 PM (8 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch
- Children:
- ed9696f
- Parents:
- 36e9cfeb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/effects/pitchshift.c
r36e9cfeb re467cf9 45 45 { 46 46 aubio_pitchshift_t *p = AUBIO_NEW (aubio_pitchshift_t); 47 int available = 0; unsigned int latency = 0;48 47 p->samplerate = samplerate; 49 if (strcmp (mode, "default") != 0) {50 AUBIO_ERR ("unknown pitch shifting method %s\n", mode);51 goto beach;52 }53 //p->mode = pitch_type;54 48 p->hopsize = hopsize; 55 49 p->timeratio = 1.; … … 97 91 //rubberband_set_debug_level(p->rb, 10); 98 92 93 #if 1 94 // warm up rubber band 95 unsigned int latency = 0; int available = 0; 99 96 latency = MAX(rubberband_get_latency(p->rb), p->hopsize); 100 101 // warm up102 97 fvec_t *zeros = new_fvec(p->hopsize); 103 98 while (available <= (int)latency) { 104 99 rubberband_process(p->rb, (const float* const*)&(zeros->data), p->hopsize, 0); 105 100 available = rubberband_available(p->rb); 106 #if 0 107 int samples_required = rubberband_get_samples_required(p->rb); 108 AUBIO_DBG("pitchshift: warmup " 109 "samples_required: %d, available: %d, hopsize: %d, latency: %d\n", 110 samples_required, available, p->hopsize, latency); 101 } 102 del_fvec(zeros); 111 103 #endif 112 }113 del_fvec(zeros);114 104 115 105 return p;
Note: See TracChangeset
for help on using the changeset viewer.