Ignore:
Timestamp:
Mar 12, 2017, 11:26:24 AM (7 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
sampler
Children:
bde49c4a
Parents:
71f2e5f (diff), 67b6618 (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 'origin/master' into sampler

Conflicts:

.travis.yml
Makefile
examples/aubionotes.c
examples/parse_args.h
python/demos/demo_timestretch_online.py
python/lib/moresetuptools.py
python/tests/test_source.py
setup.py
src/io/source.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_wavread.c

    r71f2e5f r41b985f  
    1919*/
    2020
    21 #include "config.h"
     21#include "aubio_priv.h"
    2222
    2323#ifdef HAVE_WAVREAD
    2424
    25 #include "aubio_priv.h"
    2625#include "fvec.h"
    2726#include "fmat.h"
     
    330329  uint_t end = 0;
    331330  uint_t total_wrote = 0;
     331  if (s->fid == NULL) {
     332    AUBIO_ERR("source_wavread: could not read from %s (file not opened)\n",
     333        s->path);
     334    return;
     335  }
    332336  while (total_wrote < s->hop_size) {
    333337    end = MIN(s->read_samples - s->read_index, s->hop_size - total_wrote);
     
    364368  uint_t end = 0;
    365369  uint_t total_wrote = 0;
     370  if (s->fid == NULL) {
     371    AUBIO_ERR("source_wavread: could not read from %s (file not opened)\n",
     372        s->path);
     373    return;
     374  }
    366375  while (total_wrote < s->hop_size) {
    367376    end = MIN(s->read_samples - s->read_index, s->hop_size - total_wrote);
     
    404413uint_t aubio_source_wavread_seek (aubio_source_wavread_t * s, uint_t pos) {
    405414  uint_t ret = 0;
     415  if (s->fid == NULL) {
     416    AUBIO_ERR("source_wavread: could not seek %s (file not opened?)\n", s->path, pos);
     417    return AUBIO_FAIL;
     418  }
    406419  if ((sint_t)pos < 0) {
     420    AUBIO_ERR("source_wavread: could not seek %s at %d (seeking position should be >= 0)\n", s->path, pos);
    407421    return AUBIO_FAIL;
    408422  }
     
    426440
    427441uint_t aubio_source_wavread_close (aubio_source_wavread_t * s) {
    428   if (!s->fid) {
    429     return AUBIO_FAIL;
     442  if (s->fid == NULL) {
     443    return AUBIO_OK;
    430444  }
    431445  if (fclose(s->fid)) {
Note: See TracChangeset for help on using the changeset viewer.