Changeset 6465d7f for src


Ignore:
Timestamp:
Dec 19, 2013, 11:03:57 PM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
7bb5cef
Parents:
21234ee
Message:

src/io/source_sndfile.c: fix resampled position in _seek

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_sndfile.c

    r21234ee r6465d7f  
    264264
    265265uint_t aubio_source_sndfile_seek (aubio_source_sndfile_t * s, uint_t pos) {
    266   uint_t resampled_pos = (uint_t)ROUND(pos * s->input_samplerate * 1. / s->samplerate);
     266  uint_t resampled_pos = (uint_t)ROUND(pos * s->ratio);
    267267  return sf_seek (s->handle, resampled_pos, SEEK_SET);
    268268}
Note: See TracChangeset for help on using the changeset viewer.