- Timestamp:
- Sep 20, 2014, 3:23:52 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:
- 9657163
- Parents:
- 2abe563
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
r2abe563 r892c369 173 173 { 174 174 aubio_onset_t * o = AUBIO_NEW(aubio_onset_t); 175 176 /* check parameters are valid */ 177 if ((sint_t)hop_size < 1) { 178 AUBIO_ERR("onset: got hop_size %d, but can not be < 1\n", hop_size); 179 goto beach; 180 } else if ((sint_t)buf_size < 1) { 181 AUBIO_ERR("onset: got buffer_size %d, but can not be < 1\n", buf_size); 182 goto beach; 183 } else if (buf_size < hop_size) { 184 AUBIO_ERR("onset: hop size (%d) is larger than win size (%d)\n", buf_size, hop_size); 185 goto beach; 186 } else if ((sint_t)samplerate < 1) { 187 AUBIO_ERR("onset: samplerate (%d) can not be < 1\n", samplerate); 188 goto beach; 189 } 190 175 191 /* store creation parameters */ 176 192 o->samplerate = samplerate; … … 194 210 o->total_frames = 0; 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.