浏览代码

simplified calls to round()

richarddobson 1 月之前
父节点
当前提交
39df68eeff
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 3 3
      dev/distort/distort.c
  2. 2 0
      dev/distort/distorta.c

+ 3 - 3
dev/distort/distort.c

@@ -39,9 +39,9 @@
 #include <sfsys.h>
 #include <osbind.h>
 
-#if defined unix || defined __GNUC__
-#define round lround
-#endif
+//#if defined unix || defined __GNUC__
+#define round(x) lround((x))
+//#endif
 
 //TW COMMENT : phase as used here, with vals >1 or <-1 (meaning above zero or below zero) in intrinsically 'int' 
 //             phase is also not 'float' elsewhere, 

+ 2 - 0
dev/distort/distorta.c

@@ -38,6 +38,8 @@
 #include <sfsys.h>
 #include <osbind.h>
 
+#define round(x) lround((x))
+
 static int      write_cycles(int *obufpos,int cyc_average,dataptr dz);
 static int distorta_func_crosbuf(int,int,int *,int,dataptr);
 static int distorta_func(int current_buf,int cyc_average,int *obufpos,dataptr dz);