ref: 61043ed6320103bde1062afeccba722c7c82d3f0
parent: 2c50da935368e22f9a69e334b3d0324752e74bf4
author: Paul Brossier <piem@piem.org>
date: Fri Dec 11 11:36:43 EST 2009
utils.c: woodblock vector is overlap_size long
--- a/examples/utils.c
+++ b/examples/utils.c
@@ -207,22 +207,6 @@
/* 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);
@@ -254,6 +238,22 @@
}
}
#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);