Ignore:
Timestamp:
Jun 22, 2016, 1:00:10 PM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
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.
Message:

Merge branch 'master' into notes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_wavwrite.c

    r60fc05b rf264b17  
    7878}
    7979
    80 aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(char_t * path, uint_t samplerate) {
     80aubio_sink_wavwrite_t * new_aubio_sink_wavwrite(const char_t * path, uint_t samplerate) {
    8181  aubio_sink_wavwrite_t * s = AUBIO_NEW(aubio_sink_wavwrite_t);
    8282
     
    9090  }
    9191
    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
    9396  s->max_size = MAX_SIZE;
    9497  s->bitspersample = 16;
     
    143146}
    144147
    145 uint_t aubio_sink_wavwrite_get_samplerate(aubio_sink_wavwrite_t *s)
     148uint_t aubio_sink_wavwrite_get_samplerate(const aubio_sink_wavwrite_t *s)
    146149{
    147150  return s->samplerate;
    148151}
    149152
    150 uint_t aubio_sink_wavwrite_get_channels(aubio_sink_wavwrite_t *s)
     153uint_t aubio_sink_wavwrite_get_channels(const aubio_sink_wavwrite_t *s)
    151154{
    152155  return s->channels;
     
    288291  if (!s) return;
    289292  aubio_sink_wavwrite_close(s);
     293  if (s->path) AUBIO_FREE(s->path);
    290294  AUBIO_FREE(s->scratch_data);
    291295  AUBIO_FREE(s);
Note: See TracChangeset for help on using the changeset viewer.