From: Paul Brossier Date: Thu, 17 Jan 2019 13:43:51 +0000 (+0100) Subject: [pitch_crepe] make hdf5 optional, add an error message X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=eb34c9fb518cda6f341e4931d3bd16ba09ab5806;p=aubio.git [pitch_crepe] make hdf5 optional, add an error message --- 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 }