- Timestamp:
- Sep 29, 2016, 4:21:50 PM (8 years ago)
- Branches:
- sampler, timestretch
- Children:
- 30efdd0
- Parents:
- b4ad853
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/effects/timestretch_rubberband.c
rb4ad853 r1e4b7f6 52 52 extern RubberBandOptions aubio_get_rubberband_opts(const char_t *mode); 53 53 54 static void aubio_timestretch_warmup (aubio_timestretch_t * p); 55 static sint_t aubio_timestretch_fetch(aubio_timestretch_t *p); 56 54 57 aubio_timestretch_t * 55 58 new_aubio_timestretch (const char_t * uri, const char_t * mode, … … 86 89 //rubberband_set_debug_level(p->rb, 10); 87 90 88 #if 1 91 aubio_timestretch_warmup(p); 92 93 return p; 94 95 beach: 96 del_aubio_timestretch(p); 97 return NULL; 98 } 99 100 static void 101 aubio_timestretch_warmup (aubio_timestretch_t * p) 102 { 89 103 // warm up rubber band 90 104 uint_t source_read = 0; … … 98 112 available = rubberband_available(p->rb); 99 113 } 100 #endif101 102 return p;103 104 beach:105 del_aubio_timestretch(p);106 return NULL;107 114 } 108 115 … … 184 191 } 185 192 186 void 187 aubio_timestretch_ do (aubio_timestretch_t * p, fvec_t * out, uint_t * read)193 sint_t 194 aubio_timestretch_fetch(aubio_timestretch_t *p) 188 195 { 189 196 uint_t source_read = p->hopsize; … … 198 205 available = rubberband_available(p->rb); 199 206 } 207 return source_read; 208 } 209 210 void 211 aubio_timestretch_do (aubio_timestretch_t * p, fvec_t * out, uint_t * read) 212 { 213 int available = aubio_timestretch_fetch(p); 200 214 // now retrieve the samples and write them into out->data 201 215 if (available >= (int)p->hopsize) {
Note: See TracChangeset
for help on using the changeset viewer.