Changeset 26a6af7


Ignore:
Timestamp:
Apr 21, 2016, 7:02:41 PM (9 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:
ad1df9b
Parents:
b643a33
Message:

src/io/source_{avcodec,sndfile}.c: avoid modifying input param

Location:
src/io
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    rb643a33 r26a6af7  
    167167
    168168  if (samplerate == 0) {
    169     samplerate = s->input_samplerate;
    170     //AUBIO_DBG("sampling rate set to 0, automagically adjusting to %d\n", samplerate);
    171   }
    172   s->samplerate = samplerate;
     169    s->samplerate = s->input_samplerate;
     170  } else {
     171    s->samplerate = samplerate;
     172  }
    173173
    174174  if (s->samplerate >  s->input_samplerate) {
  • src/io/source_sndfile.c

    rb643a33 r26a6af7  
    108108
    109109  if (samplerate == 0) {
    110     samplerate = s->input_samplerate;
     110    s->samplerate = s->input_samplerate;
    111111    //AUBIO_DBG("sampling rate set to 0, automagically adjusting to %d\n", samplerate);
    112   }
    113   s->samplerate = samplerate;
     112  } else {
     113    s->samplerate = samplerate;
     114  }
    114115  /* compute input block size required before resampling */
    115116  s->ratio = s->samplerate/(smpl_t)s->input_samplerate;
Note: See TracChangeset for help on using the changeset viewer.