From 417fee067e9b73adfc60a38bbc49e10d835d7bdc Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 17 Jan 2019 14:43:51 +0100 Subject: [PATCH] [pitch_crepe] make hdf5 optional, add an error message --- src/pitch/pitch_crepe.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/pitch/pitch_crepe.c b/src/pitch/pitch_crepe.c index ee76a7de..790b1143 100644 --- a/src/pitch/pitch_crepe.c +++ b/src/pitch/pitch_crepe.c @@ -413,6 +413,7 @@ smpl_t aubio_pitch_crepe_get_tolerance (aubio_pitch_crepe_t * o) uint_t aubio_pitch_crepe_load_params(aubio_pitch_crepe_t *o) { +#ifdef HAVE_HDF5 uint_t i; aubio_tensor_t *k = NULL; fvec_t *vec = NULL; @@ -511,4 +512,10 @@ uint_t aubio_pitch_crepe_load_params(aubio_pitch_crepe_t *o) } return AUBIO_OK; +#else + AUBIO_ASSERT(o); + AUBIO_ERR("pitch_crepe: hdf5 support was not built in, failed loading" + " crepe model\n"); + return AUBIO_FAIL; +#endif } -- 2.11.0