shithub: aubio

Download patch

ref: 7c8d32ab48f53ff465f1aae8bc0ec45df49e23d5
parent: 961cff13406964758b30e176bf287797fb06f136
author: Paul Brossier <piem@piem.org>
date: Sun Jul 20 17:00:41 EDT 2014

src/spectral/phasevoc.c: fix argument checks

--- a/src/spectral/phasevoc.c
+++ b/src/spectral/phasevoc.c
@@ -76,11 +76,11 @@
     AUBIO_WRN("Hop size bigger than half the window size!\n");
   } */
 
-  if (hop_s < 1) {
+  if ((sint_t)hop_s < 1) {
     AUBIO_ERR("got hop_size %d, but can not be < 1\n", hop_s);
     goto beach;
-  } else if (win_s < 1) {
-    AUBIO_ERR("got buffer_size %d, but can not be < 2\n", win_s);
+  } else if ((sint_t)win_s < 1) {
+    AUBIO_ERR("got buffer_size %d, but can not be < 1\n", win_s);
     goto beach;
   } else if (win_s < hop_s) {
     AUBIO_ERR("hop size (%d) is larger than win size (%d)\n", win_s, hop_s);