*/
-#include "config.h"
#include "aubio_priv.h"
#include "fvec.h"
#include "fmat.h"
return s;
}
#endif /* HAVE_WAVREAD */
- //AUBIO_ERROR("source: failed creating aubio source with %s"
- // " at samplerate %d with hop_size %d\n", uri, samplerate, hop_size);
- 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);
+ AUBIO_ASSERT(s);
+ if (s->s_del && s->source)
+ s->s_del((void *)s->source);
AUBIO_FREE(s);
}