shithub: dumb

Download patch

ref: 0f63644adc09deb4f7aa87d156a8d2fc70418fef
parent: 3a1e4eeeb0e868cadc392a59c962bcd0ec57e924
author: Chris Moeller <kode54@gmail.com>
date: Fri Jan 11 15:22:46 EST 2013

Fixed C99isms for MSVC

--- a/dumb/src/helpers/fir_resampler.c
+++ b/dumb/src/helpers/fir_resampler.c
@@ -28,13 +28,16 @@
 	double const step = PI / maxh * spacing;
 	double const to_w = maxh * 2 / width;
 	double const pow_a_n = pow( rolloff, maxh );
-	scale /= maxh * 2;
 	
 	double angle = (count / 2 - 1 + offset) * -step;
+
+	scale /= maxh * 2;
+
 	while ( count-- )
 	{
+		double w;
 		*out++ = 0;
-		double w = angle * to_w;
+		w = angle * to_w;
 		if ( fabs( w ) < PI )
 		{
 			double rolloff_cos_a = rolloff * cos( angle );
--- a/dumb/src/helpers/lpc.c
+++ b/dumb/src/helpers/lpc.c
@@ -160,11 +160,12 @@
 #include "internal/dumb.h"
 #include "internal/it.h"
 
-void dumb_it_add_lpc(struct DUMB_IT_SIGDATA *sigdata){
-    const int lpc_max   = 256;
-    const int lpc_order = 32;
-    const int lpc_extra = 64;
+enum { lpc_max   = 256 };
+enum { lpc_order = 32  };
+enum { lpc_extra = 64  };
 
+
+void dumb_it_add_lpc(struct DUMB_IT_SIGDATA *sigdata){
     float lpc[lpc_order * 2];
     float lpc_input[lpc_max * 2];
     float lpc_output[lpc_extra * 2];