From dcecaecaa02b5a1a43922303db1a97cf266fa8f6 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 5 Mar 2017 19:40:09 +0100 Subject: [PATCH] src/io/{sink,source}.c: clarify failover messages --- src/io/sink.c | 7 ++++--- src/io/source.c | 12 +++++++----- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/io/sink.c b/src/io/sink.c index c6e5da9d..70383cc7 100644 --- a/src/io/sink.c +++ b/src/io/sink.c @@ -97,9 +97,10 @@ aubio_sink_t * new_aubio_sink(const char_t * uri, uint_t samplerate) { 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; diff --git a/src/io/source.c b/src/io/source.c index beb198fc..41581bf5 100644 --- a/src/io/source.c +++ b/src/io/source.c @@ -113,12 +113,14 @@ aubio_source_t * new_aubio_source(const char_t * uri, uint_t samplerate, uint_t 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; } -- 2.11.0