Changeset 53bb4da


Ignore:
Timestamp:
Feb 26, 2017, 11:35:04 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
05a8c18
Parents:
0eeba03
Message:

src/io/source_sndfile.c: call sf_seek after checking for s->handle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_sndfile.c

    r0eeba03 r53bb4da  
    295295uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) {
    296296  uint_t resampled_pos = (uint_t)ROUND(pos / s->ratio);
    297   sf_count_t sf_ret = sf_seek (s->handle, resampled_pos, SEEK_SET);
     297  sf_count_t sf_ret;
    298298  if (s->handle == NULL) {
    299299    AUBIO_ERR("source_sndfile: failed seeking in %s (file not opened?)\n",
     
    301301    return AUBIO_FAIL;
    302302  }
     303  sf_ret = sf_seek (s->handle, resampled_pos, SEEK_SET);
    303304  if (sf_ret == -1) {
    304305    AUBIO_ERR("source_sndfile: Failed seeking %s at %d: %s\n", s->path, pos, sf_strerror (NULL));
Note: See TracChangeset for help on using the changeset viewer.