void examples_common_init(int argc,char ** argv) {
- aubio_sndfile_t * onsetfile;
+ aubio_sndfile_t * onsetfile = NULL;
/* parse command line arguments */
parse_args(argc, argv);
(onsetfile = new_aubio_sndfile_ro(onset_filename)) ||
(onsetfile = new_aubio_sndfile_ro("sounds/woodblock.aiff")) ||
(onsetfile = new_aubio_sndfile_ro("../sounds/woodblock.aiff"));
+ }
+ if (onsetfile) {
/* read the output sound once */
aubio_sndfile_read(onsetfile, overlap_size, woodblock);
}