Changeset 11e92ea


Ignore:
Timestamp:
Jul 15, 2012, 10:24:16 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:
5d1f716
Parents:
dd5a052
Message:

src/io/sink_sndfile.c: fix max_size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_sndfile.c

    rdd5a052 r11e92ea  
    3737  uint_t channels;
    3838  char_t *path;
     39
     40  uint_t max_size;
     41
    3942  SNDFILE *handle;
    4043  uint_t scratch_size;
     
    7174  }     
    7275
    73   s->scratch_size = s->max-size*s->channels;
     76  s->scratch_size = s->max_size*s->channels;
    7477  /* allocate data for de/interleaving reallocated when needed. */
    7578  if (s->scratch_size >= MAX_SIZE * MAX_CHANNELS) {
     
    9093
    9194  if (write > s->max_size) {
     95    AUBIO_WRN("trying to write %d frames, but only %d can be written at a time",
     96      write, s->max_size);
    9297    write = s->max_size;
    93     AUBIO_WRN("trying to write %d frames, but only %d can be written at a time",
    94       write, s->max_frames);
    9598  }
    9699
Note: See TracChangeset for help on using the changeset viewer.