From: Paul Brossier Date: Thu, 28 Apr 2016 17:39:10 +0000 (+0200) Subject: src/spectral/phasevoc.c: set scaling to 1./3 if hop_s = win_s / 8, .5 otherwise X-Git-Tag: 0.4.4~300^2~197 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=83a768ef640e5de2bc78877f0d65426b5234429f;p=aubio.git src/spectral/phasevoc.c: set scaling to 1./3 if hop_s = win_s / 8, .5 otherwise --- diff --git a/src/spectral/phasevoc.c b/src/spectral/phasevoc.c index 61c0c0f9..ea149c8e 100644 --- a/src/spectral/phasevoc.c +++ b/src/spectral/phasevoc.c @@ -120,7 +120,13 @@ aubio_pvoc_t * new_aubio_pvoc (uint_t win_s, uint_t hop_s) { pv->hop_datasize = pv->hop_s * sizeof(smpl_t); // for reconstruction with 75% overlap - pv->scale = 2./3.; + if (win_s == hop_s * 4) { + pv->scale = 2./3.; + } else if (win_s == hop_s * 8) { + pv->scale = 1./3.; + } else { + pv->scale = .5; + } return pv;