Changeset 063fa5a for src/io


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

Location:
src/io
Files:
2 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;
  • src/io/source_sndfile.h

    r85ebab8 r063fa5a  
    2525aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * path, uint_t samplerate, uint_t block_size);
    2626void aubio_source_sndfile_do(aubio_source_sndfile_t * s, fvec_t * read_to, uint_t * read);
     27uint_t aubio_source_sndfile_get_samplerate(aubio_source_sndfile_t * s);
    2728void del_aubio_source_sndfile(aubio_source_sndfile_t * s);
    2829
Note: See TracChangeset for help on using the changeset viewer.