- Timestamp:
- Jan 29, 2015, 4:23:30 PM (10 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- deb1fd4
- Parents:
- 16f8dcc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tempo/tempo.c
r16f8dcc r9be906a 164 164 char_t specdesc_func[20]; 165 165 o->samplerate = samplerate; 166 // check parameters are valid 167 if ((sint_t)hop_size < 1) { 168 AUBIO_ERR("tempo: got hop size %d, but can not be < 1\n", hop_size); 169 goto beach; 170 } else if ((sint_t)buf_size < 1) { 171 AUBIO_ERR("tempo: got window size %d, but can not be < 1\n", buf_size); 172 goto beach; 173 } else if (buf_size < hop_size) { 174 AUBIO_ERR("tempo: hop size (%d) is larger than window size (%d)\n", buf_size, hop_size); 175 goto beach; 176 } else if ((sint_t)samplerate < 1) { 177 AUBIO_ERR("tempo: samplerate (%d) can not be < 1\n", samplerate); 178 goto beach; 179 } 180 166 181 /* length of observations, worth about 6 seconds */ 167 182 o->winlen = aubio_next_power_of_two(5.8 * samplerate / hop_size); 183 if (o->winlen < 4) o->winlen = 4; 168 184 o->step = o->winlen/4; 169 185 o->blockpos = 0; … … 194 210 }*/ 195 211 return o; 212 213 beach: 214 AUBIO_FREE(o); 215 return NULL; 196 216 } 197 217
Note: See TracChangeset
for help on using the changeset viewer.