Changeset 283a619a for src/effects
- Timestamp:
- Dec 6, 2018, 11:30:54 AM (6 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 3a96d3d
- Parents:
- 633400d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/effects/pitchshift_rubberband.c
r633400d r283a619a 50 50 p->hopsize = hopsize; 51 51 p->pitchscale = 1.; 52 if (transpose >= -24. && transpose <= 24.) { 53 p->pitchscale = POW(2., transpose / 12.); 54 } else { 55 AUBIO_ERR("pitchshift: transpose should be in the range [-24, 24], got %f\n", transpose); 52 if ((sint_t)hopsize <= 0) { 53 AUBIO_ERR("pitchshift: hop_size should be >= 0, got %d\n", hopsize); 54 goto beach; 55 } 56 if ((sint_t)samplerate <= 0) { 57 AUBIO_ERR("pitchshift: samplerate should be >= 0, got %d\n", samplerate); 56 58 goto beach; 57 59 } … … 62 64 goto beach; 63 65 } 66 64 67 //AUBIO_MSG("pitchshift: using pitch shifting method %s\n", mode); 65 68 … … 67 70 rubberband_set_max_process_size(p->rb, p->hopsize); 68 71 //rubberband_set_debug_level(p->rb, 10); 72 73 if (aubio_pitchshift_set_transpose(p, transpose)) goto beach; 69 74 70 75 #if 1 … … 140 145 aubio_pitchshift_do (aubio_pitchshift_t * p, const fvec_t * in, fvec_t * out) 141 146 { 142 int output = 0;143 rubberband_process(p->rb, (const float* const*)&(in->data), p->hopsize, output);147 // third parameter is always 0 since we are never expecting a final frame 148 rubberband_process(p->rb, (const float* const*)&(in->data), p->hopsize, 0); 144 149 if (rubberband_available(p->rb) >= (int)p->hopsize) { 145 150 rubberband_retrieve(p->rb, (float* const*)&(out->data), p->hopsize);
Note: See TracChangeset
for help on using the changeset viewer.