Changeset 9af07aa for examples


Ignore:
Timestamp:
Jul 21, 2006, 3:58:26 PM (18 years ago)
Author:
Paul Brossier <piem@altern.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:
e8830c4
Parents:
b91fe6e
Message:

exit from examples when woodblock or input files not found
exit from examples when woodblock or input files not found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    rb91fe6e r9af07aa  
    254254                  (onsetfile = new_aubio_sndfile_ro("sounds/woodblock.aiff")) ||
    255255                  (onsetfile = new_aubio_sndfile_ro("../sounds/woodblock.aiff"));
     256          if (onsetfile == NULL) {
     257            outmsg("Could not find woodblock.aiff\n");
     258            exit(1);
     259          }
    256260  }
    257261  if (onsetfile) {
     
    264268    debug("Opening files ...\n");
    265269    file = new_aubio_sndfile_ro (input_filename);
     270    if (file == NULL) {
     271      outmsg("Could not open input file %s.\n", input_filename);
     272      exit(1);
     273    }
    266274    if (verbose) aubio_sndfile_info(file);
    267275    channels = aubio_sndfile_channels(file);
Note: See TracChangeset for help on using the changeset viewer.