uint_t samplerate;
uint_t channels;
char_t *path;
+
+ uint_t max_size;
+
SNDFILE *handle;
uint_t scratch_size;
smpl_t *scratch_data;
return NULL;
}
- s->scratch_size = s->max-size*s->channels;
+ s->scratch_size = s->max_size*s->channels;
/* allocate data for de/interleaving reallocated when needed. */
if (s->scratch_size >= MAX_SIZE * MAX_CHANNELS) {
AUBIO_ERR("%d x %d exceeds maximum aubio_sink_sndfile buffer size %d\n",
smpl_t *pwrite;
if (write > s->max_size) {
- write = s->max_size;
AUBIO_WRN("trying to write %d frames, but only %d can be written at a time",
- write, s->max_frames);
+ write, s->max_size);
+ write = s->max_size;
}
/* interleaving data */