Changeset f33ab63 for src/io/source_sndfile.c
- Timestamp:
- Sep 5, 2014, 2:41:59 AM (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:
- 2abe563
- Parents:
- 0ff4434
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_sndfile.c
r0ff4434 rf33ab63 200 200 #ifdef HAVE_SAMPLERATE 201 201 if (s->ratio != 1) { 202 AUBIO_ERR("source_sndfile: no multi channel resampling yet ");202 AUBIO_ERR("source_sndfile: no multi channel resampling yet\n"); 203 203 return; 204 204 //ptr_data = s->input_data->data; … … 265 265 uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) { 266 266 uint_t resampled_pos = (uint_t)ROUND(pos / s->ratio); 267 return sf_seek (s->handle, resampled_pos, SEEK_SET); 267 sf_count_t sf_ret = sf_seek (s->handle, resampled_pos, SEEK_SET); 268 if (sf_ret == -1) { 269 AUBIO_ERR("source_sndfile: Failed seeking %s at %d: %s\n", s->path, pos, sf_strerror (NULL)); 270 return AUBIO_FAIL; 271 } 272 if (sf_ret != resampled_pos) { 273 AUBIO_ERR("source_sndfile: Tried seeking %s at %d, but got %lld: %s\n", 274 s->path, resampled_pos, sf_ret, sf_strerror (NULL)); 275 return AUBIO_FAIL; 276 } 277 return AUBIO_OK; 268 278 } 269 279 … … 273 283 } 274 284 if(sf_close(s->handle)) { 275 AUBIO_ERR("source_sndfile: Error closing file %s: %s ", s->path, sf_strerror (NULL));285 AUBIO_ERR("source_sndfile: Error closing file %s: %s\n", s->path, sf_strerror (NULL)); 276 286 return AUBIO_FAIL; 277 287 }
Note: See TracChangeset
for help on using the changeset viewer.