commit 0d06bf56e3f6431a42b4c6889edbdee3bc532781
parent cb4abe8e6a5d95b7cc23022c58e4b6b856708c4c
Author: lostd <lostd@2f30.org>
Date: Mon, 15 Sep 2014 12:26:24 +0100
No need to redefine MIN
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/nausea.c b/nausea.c
@@ -11,6 +11,7 @@
#include <fftw3.h>
#define LEN(x) (sizeof (x) / sizeof *(x))
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
static unsigned msec = 1000 / 25; /* 25 fps */
static unsigned nsamples = 44100 * 2; /* stereo */
@@ -226,10 +227,8 @@ draw_spectrum(struct frame *fr)
bar_height /= freqs_per_col;
/* we draw from top to bottom */
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
ybegin = fr->height - MIN(bar_height, fr->height);
yend = fr->height;
-#undef MIN
/* If the current freq reaches the peak, the peak is
* updated to that height, else it drops by one line. */
@@ -380,10 +379,8 @@ draw_fountain(struct frame *fr)
/* we draw from top to bottom */
if (i == col) {
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
ybegin = fr->height - MIN(bar_height, fr->height);
fr->sav[col] = ybegin;
-#undef MIN
} else {
if (keep)
ybegin = fr->sav[i];