Ignore:
Timestamp:
Jul 27, 2012, 7:24:32 PM (12 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:
e1703b3
Parents:
85ebab8
Message:

src/io/source_sndfile.{c,h}: add get_samplerate, if == 1 use file samplerate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_sndfile.c

    r85ebab8 r063fa5a  
    9090  s->input_format     = sfinfo.format;
    9191
     92  if (s->samplerate == 1) s->samplerate = s->input_samplerate;
     93
    9294  /* compute input block size required before resampling */
    9395  s->ratio = s->samplerate/(float)s->input_samplerate;
     
    169171}
    170172
     173uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s) {
     174  return s->samplerate;
     175}
     176
    171177void del_aubio_source_sndfile(aubio_source_sndfile_t * s){
    172178  if (!s) return;
Note: See TracChangeset for help on using the changeset viewer.