Changeset f264b17 for src/io/sink_wavwrite.c
- Timestamp:
- Jun 22, 2016, 1:00:10 PM (9 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:
- 4b9443c4
- Parents:
- 60fc05b (diff), 6769586 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/io/sink_wavwrite.c
r60fc05b rf264b17 78 78 } 79 79 80 aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(c har_t * path, uint_t samplerate) {80 aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(const char_t * path, uint_t samplerate) { 81 81 aubio_sink_wavwrite_t * s = AUBIO_NEW(aubio_sink_wavwrite_t); 82 82 … … 90 90 } 91 91 92 s->path = path; 92 if (s->path) AUBIO_FREE(s->path); 93 s->path = AUBIO_ARRAY(char_t, strnlen(path, PATH_MAX) + 1); 94 strncpy(s->path, path, strnlen(path, PATH_MAX) + 1); 95 93 96 s->max_size = MAX_SIZE; 94 97 s->bitspersample = 16; … … 143 146 } 144 147 145 uint_t aubio_sink_wavwrite_get_samplerate( aubio_sink_wavwrite_t *s)148 uint_t aubio_sink_wavwrite_get_samplerate(const aubio_sink_wavwrite_t *s) 146 149 { 147 150 return s->samplerate; 148 151 } 149 152 150 uint_t aubio_sink_wavwrite_get_channels( aubio_sink_wavwrite_t *s)153 uint_t aubio_sink_wavwrite_get_channels(const aubio_sink_wavwrite_t *s) 151 154 { 152 155 return s->channels; … … 288 291 if (!s) return; 289 292 aubio_sink_wavwrite_close(s); 293 if (s->path) AUBIO_FREE(s->path); 290 294 AUBIO_FREE(s->scratch_data); 291 295 AUBIO_FREE(s);
Note: See TracChangeset
for help on using the changeset viewer.