Ignore:
Timestamp:
Jan 26, 2014, 8:16:59 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
422452b
Parents:
082c88b
Message:

src/io/sink*: add _close function, improve error messages

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/sink_wavwrite.c

    r082c88b ra9fd272  
    153153
    154154beach:
    155   AUBIO_ERR("sink_wavwrite: can not write %s at samplerate %dHz\n",
    156       s->path, s->samplerate);
     155  //AUBIO_ERR("sink_wavwrite: failed creating %s with samplerate %dHz\n",
     156  //    s->path, s->samplerate);
    157157  del_aubio_sink_wavwrite(s);
    158158  return NULL;
     
    182182}
    183183
    184 void aubio_sink_wavwrite_close(aubio_sink_wavwrite_t * s) {
     184uint_t aubio_sink_wavwrite_close(aubio_sink_wavwrite_t * s) {
    185185  uint_t data_size = s->total_frames_written * s->bitspersample * s->channels / 8;
    186186  unsigned char buf[5];
    187   if (!s->fid) return;
     187  if (!s->fid) return AUBIO_FAIL;
    188188  // ChunkSize
    189189  fseek(s->fid, 4, SEEK_SET);
     
    197197  }
    198198  s->fid = NULL;
     199  return AUBIO_OK;
    199200}
    200201
Note: See TracChangeset for help on using the changeset viewer.