#include "aubio_priv.h"
#include "source_sndfile.h"
#include "fvec.h"
-#include "mathutils.h"
#define MAX_CHANNELS 6
#define MAX_SIZE 4096
}
s->scratch_size = s->hop_size*s->input_channels;
- s->scratch_data = AUBIO_ARRAY(float,s->scratch_size);
-
/* allocate data for de/interleaving reallocated when needed. */
if (s->scratch_size >= MAX_SIZE * MAX_CHANNELS) {
- AUBIO_ERR("%d exceeds maximum aubio_source_sndfile buffer size %d\n", s->scratch_size, MAX_CHANNELS * MAX_CHANNELS);
+ AUBIO_ERR("%d x %d exceeds maximum aubio_source_sndfile buffer size %d\n",
+ s->hop_size, s->input_channels, MAX_CHANNELS * MAX_CHANNELS);
return NULL;
}
+ s->scratch_data = AUBIO_ARRAY(float,s->scratch_size);
return s;
}
sf_count_t read_frames;
int i,j, input_channels = s->input_channels;
int aread;
- smpl_t *pread;
-
/* do actual reading */
read_frames = sf_read_float (s->handle, s->scratch_data, s->scratch_size);