- Timestamp:
- Jul 16, 2012, 2:48:03 AM (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:
- e3b5962
- Parents:
- 65525fe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_sndfile.c
r65525fe r776a5d3 87 87 88 88 void aubio_sink_sndfile_do(aubio_sink_sndfile_t *s, fvec_t * write_data, uint_t write){ 89 sf_count_t written_frames = 0; 90 int i, j, channels = s->channels; 89 uint_t i, j, channels = s->channels; 91 90 int nsamples = channels*write; 92 91 smpl_t *pwrite; … … 101 100 for ( i = 0; i < channels; i++) { 102 101 pwrite = (smpl_t *)write_data->data; 103 for (j =0; j < write; j++) {102 for (j = 0; j < write; j++) { 104 103 s->scratch_data[channels*j+i] = pwrite[j]; 105 104 } 106 105 } 107 106 108 uint_t written= sf_write_float (s->handle, s->scratch_data, nsamples);109 if (written /channels != write) {107 sf_count_t written_frames = sf_write_float (s->handle, s->scratch_data, nsamples); 108 if (written_frames/channels != write) { 110 109 AUBIO_WRN("trying to write %d frames to %s, but only %d could be written", 111 write, s->path, written);110 write, s->path, (uint_t)written_frames); 112 111 } 113 112 return;
Note: See TracChangeset
for help on using the changeset viewer.