shithub: aubio

Download patch

ref: dcecaecaa02b5a1a43922303db1a97cf266fa8f6
parent: ad2eac2a0413f1a7f536840acb4851058a8eb922
author: Paul Brossier <[email protected]>
date: Sun Mar 5 14:40:09 EST 2017

src/io/{sink,source}.c: clarify failover messages

--- a/src/io/sink.c
+++ b/src/io/sink.c
@@ -97,9 +97,10 @@
     return s;
   }
 #endif /* HAVE_WAVWRITE */
-#if !defined(HAVE_WAVWRITE) && !defined(HAVE_SNDFILE) && !defined(HAVE_SINK_APPLE_AUDIO)
-  AUBIO_ERROR("sink: failed creating '%s' (no sink built-in)\n",
-      uri, samplerate);
+#if !defined(HAVE_WAVWRITE) && \
+  !defined(HAVE_SNDFILE) && \
+  !defined(HAVE_SINK_APPLE_AUDIO)
+  AUBIO_ERROR("sink: failed creating '%s' at %dHz (no sink built-in)\n", uri, samplerate);
 #endif
   AUBIO_FREE(s);
   return NULL;
--- a/src/io/source.c
+++ b/src/io/source.c
@@ -113,12 +113,14 @@
     s->s_del = (del_aubio_source_t)(del_aubio_source_wavread);
     return s;
   }
-#else /* failover message */
-#if !(defined(HAVE_LIBAV) || defined(HAVE_SOURCE_APPLE_AUDIO) || defined(HAVE_SNDFILE))
-  AUBIO_ERROR("source: failed creating aubio source with %s"
-     " at samplerate %d with hop_size %d\n", uri, samplerate, hop_size);
-#endif /* failover */
 #endif /* HAVE_WAVREAD */
+#if !defined(HAVE_WAVREAD) && \
+  !defined(HAVE_LIBAV) && \
+  !defined(HAVE_SOURCE_APPLE_AUDIO) && \
+  !defined(HAVE_SNDFILE)
+  AUBIO_ERROR("source: failed creating with %s at %dHz with hop size %d"
+     " (no source built-in)\n", uri, samplerate, hop_size);
+#endif
   AUBIO_FREE(s);
   return NULL;
 }