shithub: aubio

Download patch

ref: 67b05b40e9f03e7f67bcc9bc46d45d622d7b238a
parent: 78c21cf24af6b083dfbdee5892ece4411529fafa
author: Paul Brossier <[email protected]>
date: Mon Dec 30 14:26:14 EST 2013

src/io/source_sndfile.c: improve build with -Wdeclaration-after-statement

--- a/src/io/source_sndfile.c
+++ b/src/io/source_sndfile.c
@@ -63,6 +63,7 @@
 
 aubio_source_sndfile_t * new_aubio_source_sndfile(char_t * path, uint_t samplerate, uint_t hop_size) {
   aubio_source_sndfile_t * s = AUBIO_NEW(aubio_source_sndfile_t);
+  SF_INFO sfinfo;
 
   if (path == NULL) {
     AUBIO_ERR("Aborted opening null path\n");
@@ -82,7 +83,6 @@
   s->path = path;
 
   // try opening the file, getting the info in sfinfo
-  SF_INFO sfinfo;
   AUBIO_MEMSET(&sfinfo, 0, sizeof (sfinfo));
   s->handle = sf_open (s->path, SFM_READ, &sfinfo);