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 */
- AUBIO_FREE(s);
+#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
+ del_aubio_source(s);
return NULL;
}
}
void del_aubio_source(aubio_source_t * s) {
- if (!s) return;
- s->s_del((void *)s->source);
+ if (s->s_del && s->source)
+ s->s_del((void *)s->source);
AUBIO_FREE(s);
}