- Timestamp:
- Dec 16, 2018, 7:17:26 PM (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:
- dea8506
- Parents:
- e406835
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_wavwrite.c
re406835 r3e1c482 88 88 goto beach; 89 89 } 90 if ((sint_t)samplerate < 0) { 91 AUBIO_ERR("sink_wavwrite: Can not create %s with samplerate %d\n", path, samplerate); 92 goto beach; 93 } 94 95 if (s->path) AUBIO_FREE(s->path); 90 96 91 s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX) + 1); 97 92 strncpy(s->path, path, strnlen(path, PATH_MAX) + 1); … … 136 131 s->samplerate = samplerate; 137 132 // automatically open when both samplerate and channels have been set 138 if ( s->samplerate != 0 &&s->channels != 0) {133 if (/* s->samplerate != 0 && */ s->channels != 0) { 139 134 return aubio_sink_wavwrite_open(s); 140 135 } … … 149 144 s->channels = channels; 150 145 // automatically open when both samplerate and channels have been set 151 if (s->samplerate != 0 && s->channels != 0) {146 if (s->samplerate != 0 /* && s->channels != 0 */) { 152 147 return aubio_sink_wavwrite_open(s); 153 148 } … … 295 290 296 291 void del_aubio_sink_wavwrite(aubio_sink_wavwrite_t * s){ 297 if (!s) return; 298 aubio_sink_wavwrite_close(s); 299 if (s->path) AUBIO_FREE(s->path); 300 AUBIO_FREE(s->scratch_data); 292 AUBIO_ASSERT(s); 293 if (s->fid) 294 aubio_sink_wavwrite_close(s); 295 if (s->path) 296 AUBIO_FREE(s->path); 297 if (s->scratch_data) 298 AUBIO_FREE(s->scratch_data); 301 299 AUBIO_FREE(s); 302 300 }
Note: See TracChangeset
for help on using the changeset viewer.