Changeset 447c673 for src/io


Ignore:
Timestamp:
Dec 6, 2013, 8:38:31 PM (10 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:
7816f2b
Parents:
919139b
Message:

src/io/source_sndfile.c: also check parameters here, synchronise tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_sndfile.c

    r919139b r447c673  
    6767  if (path == NULL) {
    6868    AUBIO_ERR("Aborted opening null path\n");
    69     return NULL;
     69    goto beach;
     70  }
     71  if ((sint_t)samplerate < 0) {
     72    AUBIO_ERR("Can not open %s with samplerate %d\n", path, samplerate);
     73    goto beach;
     74  }
     75  if ((sint_t)hop_size <= 0) {
     76    AUBIO_ERR("Can not open %s with hop_size %d\n", path, hop_size);
     77    goto beach;
    7078  }
    7179
     
    134142
    135143beach:
    136   AUBIO_ERR("can not read %s at samplerate %dHz with a hop_size of %d\n",
    137       s->path, s->samplerate, s->hop_size);
     144  //AUBIO_ERR("can not read %s at samplerate %dHz with a hop_size of %d\n",
     145  //    s->path, s->samplerate, s->hop_size);
    138146  del_aubio_source_sndfile(s);
    139147  return NULL;
Note: See TracChangeset for help on using the changeset viewer.