[lib] add AUBIO_ASSERT for debug mode
[aubio.git] / src / aubio_priv.h
index 589c47a..c26b1f4 100644 (file)
@@ -367,4 +367,11 @@ uint_t aubio_log(sint_t level, const char_t *fmt, ...);
 #endif
 #endif /* __STRICT_ANSI__ */
 
+#if defined(DEBUG)
+#include <assert.h>
+#define AUBIO_ASSERT(x) assert(x)
+#else
+#define AUBIO_ASSERT(x)
+#endif /* DEBUG */
+
 #endif /* AUBIO_PRIV_H */