Changeset b1f723d for examples


Ignore:
Timestamp:
Aug 10, 2005, 1:43:39 AM (19 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:
b5aa063
Parents:
5cf415f
Message:

fix segfault when file not found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    r5cf415f rb1f723d  
    211211
    212212
    213   aubio_sndfile_t * onsetfile;
     213  aubio_sndfile_t * onsetfile = NULL;
    214214  /* parse command line arguments */
    215215  parse_args(argc, argv);
     
    220220                  (onsetfile = new_aubio_sndfile_ro("sounds/woodblock.aiff")) ||
    221221                  (onsetfile = new_aubio_sndfile_ro("../sounds/woodblock.aiff"));
     222  }
     223  if (onsetfile) {
    222224          /* read the output sound once */
    223225          aubio_sndfile_read(onsetfile, overlap_size, woodblock);
Note: See TracChangeset for help on using the changeset viewer.