- Timestamp:
- Dec 13, 2018, 1:46:29 AM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 39c8d08
- Parents:
- 2d64a24
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_wavwrite.c
r2d64a24 ra97eb17 234 234 235 235 void aubio_sink_wavwrite_do(aubio_sink_wavwrite_t *s, fvec_t * write_data, uint_t write){ 236 uint_t i = 0, written_frames = 0;236 uint_t c = 0, i = 0, written_frames = 0; 237 237 238 238 if (write > s->max_size) { … … 242 242 } 243 243 244 for (i = 0; i < write; i++) { 245 s->scratch_data[i] = HTOLES(FLOAT_TO_SHORT(write_data->data[i])); 246 } 247 written_frames = fwrite(s->scratch_data, 2, write, s->fid); 244 for (c = 0; c < s->channels; c++) { 245 for (i = 0; i < write; i++) { 246 s->scratch_data[i * s->channels + c] = HTOLES(FLOAT_TO_SHORT(write_data->data[i])); 247 } 248 } 249 written_frames = fwrite(s->scratch_data, 2, write * s->channels, s->fid); 248 250 249 251 if (written_frames != write) {
Note: See TracChangeset
for help on using the changeset viewer.