From: Paul Brossier Date: Fri, 11 Dec 2009 15:36:43 +0000 (+0100) Subject: utils.c: woodblock vector is overlap_size long X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=61043ed6320103bde1062afeccba722c7c82d3f0;p=aubio.git utils.c: woodblock vector is overlap_size long --- diff --git a/examples/utils.c b/examples/utils.c index a9e77a24..6b6e00b6 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -207,22 +207,6 @@ examples_common_init (int argc, char **argv) /* parse command line arguments */ parse_args (argc, argv); - woodblock = new_fvec (buffer_size, 1); - if (output_filename || usejack) { - /* dummy assignement to keep egcs happy */ - found_wood = (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 == NULL) { - outmsg ("Could not find woodblock.aiff\n"); - exit (1); - } - } - if (onsetfile) { - /* read the output sound once */ - aubio_sndfile_read (onsetfile, overlap_size, woodblock); - } - if (!usejack) { debug ("Opening files ...\n"); file = new_aubio_sndfile_ro (input_filename); @@ -255,6 +239,22 @@ examples_common_init (int argc, char **argv) } #endif /* HAVE_LASH */ + woodblock = new_fvec (overlap_size, channels); + if (output_filename || usejack) { + /* dummy assignement to keep egcs happy */ + found_wood = (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 == NULL) { + outmsg ("Could not find woodblock.aiff\n"); + exit (1); + } + } + if (onsetfile) { + /* read the output sound once */ + aubio_sndfile_read (onsetfile, overlap_size, woodblock); + } + ibuf = new_fvec (overlap_size, channels); obuf = new_fvec (overlap_size, channels);