shithub: aubio

Download patch

ref: 83a768ef640e5de2bc78877f0d65426b5234429f
parent: 98e9d69fde9bc4265cda079a558b566d37551033
author: Paul Brossier <piem@piem.org>
date: Thu Apr 28 15:39:10 EDT 2016

src/spectral/phasevoc.c: set scaling to 1./3 if hop_s = win_s / 8, .5 otherwise

--- a/src/spectral/phasevoc.c
+++ b/src/spectral/phasevoc.c
@@ -120,7 +120,13 @@
   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;