Changeset af86999 for src/io/source_sndfile.c
- Timestamp:
- Jul 14, 2012, 8:39:09 PM (12 years ago)
- 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:
- 2c3d4ca
- Parents:
- 6192ce7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/source_sndfile.c
r6192ce7 raf86999 29 29 #include "source_sndfile.h" 30 30 #include "fvec.h" 31 #include "mathutils.h"32 31 33 32 #define MAX_CHANNELS 6 … … 87 86 88 87 s->scratch_size = s->hop_size*s->input_channels; 89 s->scratch_data = AUBIO_ARRAY(float,s->scratch_size);90 91 88 /* allocate data for de/interleaving reallocated when needed. */ 92 89 if (s->scratch_size >= MAX_SIZE * MAX_CHANNELS) { 93 AUBIO_ERR("%d exceeds maximum aubio_source_sndfile buffer size %d\n", s->scratch_size, MAX_CHANNELS * MAX_CHANNELS); 90 AUBIO_ERR("%d x %d exceeds maximum aubio_source_sndfile buffer size %d\n", 91 s->hop_size, s->input_channels, MAX_CHANNELS * MAX_CHANNELS); 94 92 return NULL; 95 93 } 94 s->scratch_data = AUBIO_ARRAY(float,s->scratch_size); 96 95 97 96 return s; … … 102 101 int i,j, input_channels = s->input_channels; 103 102 int aread; 104 smpl_t *pread;105 106 103 /* do actual reading */ 107 104 read_frames = sf_read_float (s->handle, s->scratch_data, s->scratch_size);
Note: See TracChangeset
for help on using the changeset viewer.