From: Paul Brossier Date: Tue, 8 Jan 2019 16:05:44 +0000 (+0100) Subject: [pitch] crepe only supports samplerate==16000 and bufsize==1024 for now X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=259c33bd9a8d1e5417f97e1f62b9a72c47e454cb;p=aubio.git [pitch] crepe only supports samplerate==16000 and bufsize==1024 for now --- diff --git a/src/pitch/pitch.c b/src/pitch/pitch.c index 0e2d1d91..95e71a0c 100644 --- a/src/pitch/pitch.c +++ b/src/pitch/pitch.c @@ -227,6 +227,17 @@ new_aubio_pitch (const char_t * pitch_mode, aubio_pitchspecacf_set_tolerance (p->p_object, 0.85); break; case aubio_pitcht_crepe: + // TODO add resampling and blocking + if (samplerate != 16000) { + AUBIO_ERROR("pitch: crepe samplerate must be 16000Hz, got %d\n", + samplerate); + goto beach; + } + if (bufsize != 1024) { + AUBIO_ERROR("pitch: crepe buffer size must be 1024, got %d\n", + bufsize); + goto beach; + } p->buf = new_fvec (bufsize); p->p_object = new_aubio_pitch_crepe(); if (!p->p_object) goto beach;