Changes in / [171ae68:b8fa393]
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
.travis.yml
r171ae68 rb8fa393 12 12 os: linux 13 13 compiler: gcc 14 - python: "pypy"15 os: linux16 compiler: gcc17 env: CFLAGS="-Os" WAFOPTS="--disable-avcodec"18 14 - python: 3.5 19 15 os: linux 20 16 compiler: gcc 21 env: CFLAGS="-Os" WAFOPTS="--disable-samplerate "17 env: CFLAGS="-Os" WAFOPTS="--disable-samplerate --disable-sndfile" 22 18 - python: 3.4 23 19 os: linux 24 20 compiler: gcc 25 env: HAVE_AUBIO_DOUBLE=1 CFLAGS="-O3" WAFOPTS="--enable-fftw3 "21 env: HAVE_AUBIO_DOUBLE=1 CFLAGS="-O3" WAFOPTS="--enable-fftw3 --disable-avcodec" 26 22 - python: 2.7 27 23 os: linux -
python/ext/py-source.c
r171ae68 rb8fa393 574 574 } else if (PyLong_AsLong(size) > 0) { 575 575 // short read, return a shorter array 576 PyArrayObject *shortread = (PyArrayObject*) 577 PyArray_FROM_OTF(PyTuple_GetItem(done, 0), NPY_NOTYPE, 578 NPY_ARRAY_ENSURECOPY); 576 PyArrayObject *shortread = (PyArrayObject*)PyTuple_GetItem(done, 0); 579 577 PyArray_Dims newdims; 580 578 PyObject *reshaped; -
src/io/source_avcodec.c
r171ae68 rb8fa393 526 526 uint_t end = 0; 527 527 uint_t total_wrote = 0; 528 uint_t length = aubio_source_validate_input_length("source_ avcodec", s->path,528 uint_t length = aubio_source_validate_input_length("source_wavread", s->path, 529 529 s->hop_size, read_data->length); 530 uint_t channels = aubio_source_validate_input_channels("source_ avcodec",530 uint_t channels = aubio_source_validate_input_channels("source_wavread", 531 531 s->path, s->input_channels, read_data->height); 532 532 while (total_wrote < length) { -
src/io/source_sndfile.c
r171ae68 rb8fa393 174 174 s->hop_size, read_data->length); 175 175 sf_count_t read_samples = aubio_sf_read_smpl (s->handle, s->scratch_data, 176 s-> scratch_size);177 178 uint_t read_length = read_samples / s->input_channels;176 s->input_channels * length); 177 178 length = MIN(read_samples / s->input_channels, length); 179 179 180 180 /* where to store de-interleaved data */ … … 186 186 #endif /* HAVE_SAMPLERATE */ 187 187 { 188 read_length = MIN(length, read_length);189 188 ptr_data = read_data->data; 190 189 } 191 190 192 191 /* de-interleaving and down-mixing data */ 193 for (j = 0; j < read_length; j++) {192 for (j = 0; j < length; j++) { 194 193 ptr_data[j] = 0; 195 194 for (i = 0; i < input_channels; i++) { … … 205 204 #endif /* HAVE_SAMPLERATE */ 206 205 207 *read = MIN(length, (uint_t)FLOOR(s->ratio * read_length + .5));206 *read = (int)FLOOR(s->ratio * length + .5); 208 207 209 208 aubio_source_pad_output (read_data, *read); … … 219 218 s->path, s->input_channels, read_data->height); 220 219 sf_count_t read_samples = aubio_sf_read_smpl (s->handle, s->scratch_data, 221 s->scratch_size);222 223 uint_t read_length = read_samples / s->input_channels;220 length * s->input_channels); 221 222 length = MIN(read_samples / s->input_channels, length); 224 223 225 224 /* where to store de-interleaved data */ … … 231 230 #endif /* HAVE_SAMPLERATE */ 232 231 { 233 read_length = MIN(read_length, length);234 232 ptr_data = read_data->data; 235 233 } 236 234 237 for (j = 0; j < read_length; j++) {235 for (j = 0; j < length; j++) { 238 236 for (i = 0; i < channels; i++) { 239 237 ptr_data[i][j] = s->scratch_data[j * input_channels + i]; … … 254 252 #endif /* HAVE_SAMPLERATE */ 255 253 256 *read = MIN(length, (uint_t)FLOOR(s->ratio * read_length + .5));254 *read = (int)FLOOR(s->ratio * length + .5); 257 255 258 256 aubio_source_pad_multi_output(read_data, input_channels, *read);
Note: See TracChangeset
for help on using the changeset viewer.