shithub: aubio

Download patch

ref: de66709a32cc437f175704d3051f87c0127d9096
parent: a9ec06f5998c20a2609324c2d5855106d4626d1d
author: Paul Brossier <piem@piem.org>
date: Fri Apr 22 20:51:07 EDT 2016

src/: use #ifdef HAVE_FOO, not #if HAVE_FOO

--- a/src/fvec.c
+++ b/src/fvec.c
@@ -125,7 +125,7 @@
         s->length, t->length);
     return;
   }
-#if HAVE_NOOPT
+#ifdef HAVE_NOOPT
   uint_t j;
   for (j=0; j< t->length; j++) {
     t->data[j] = s->data[j];
--- a/src/io/sink.c
+++ b/src/io/sink.c
@@ -70,7 +70,7 @@
     return s;
   }
 #endif /* HAVE_SINK_APPLE_AUDIO */
-#if HAVE_SNDFILE
+#ifdef HAVE_SNDFILE
   s->sink = (void *)new_aubio_sink_sndfile(uri, samplerate);
   if (s->sink) {
     s->s_do = (aubio_sink_do_t)(aubio_sink_sndfile_do);
@@ -84,7 +84,7 @@
     return s;
   }
 #endif /* HAVE_SNDFILE */
-#if HAVE_WAVWRITE
+#ifdef HAVE_WAVWRITE
   s->sink = (void *)new_aubio_sink_wavwrite(uri, samplerate);
   if (s->sink) {
     s->s_do = (aubio_sink_do_t)(aubio_sink_wavwrite_do);
--- a/src/io/source.c
+++ b/src/io/source.c
@@ -57,7 +57,7 @@
 
 aubio_source_t * new_aubio_source(const char_t * uri, uint_t samplerate, uint_t hop_size) {
   aubio_source_t * s = AUBIO_NEW(aubio_source_t);
-#if HAVE_LIBAV
+#ifdef HAVE_LIBAV
   s->source = (void *)new_aubio_source_avcodec(uri, samplerate, hop_size);
   if (s->source) {
     s->s_do = (aubio_source_do_t)(aubio_source_avcodec_do);
@@ -83,7 +83,7 @@
     return s;
   }
 #endif /* HAVE_SOURCE_APPLE_AUDIO */
-#if HAVE_SNDFILE
+#ifdef HAVE_SNDFILE
   s->source = (void *)new_aubio_source_sndfile(uri, samplerate, hop_size);
   if (s->source) {
     s->s_do = (aubio_source_do_t)(aubio_source_sndfile_do);
@@ -96,7 +96,7 @@
     return s;
   }
 #endif /* HAVE_SNDFILE */
-#if HAVE_WAVREAD
+#ifdef HAVE_WAVREAD
   s->source = (void *)new_aubio_source_wavread(uri, samplerate, hop_size);
   if (s->source) {
     s->s_do = (aubio_source_do_t)(aubio_source_wavread_do);
--- a/src/temporal/resampler.c
+++ b/src/temporal/resampler.c
@@ -24,7 +24,7 @@
 #include "fvec.h"
 #include "temporal/resampler.h"
 
-#if HAVE_SAMPLERATE
+#ifdef HAVE_SAMPLERATE
 
 #include <samplerate.h>         /* from libsamplerate */