# HG changeset patch # User Chris Cannam # Date 1441623674 -3600 # Node ID 433e3aac9e528ba24134279762aa290ecab62281 # Parent 2420733abeb664f3f68ce0f91490a107920797ec Add pi.h. Let's stop messing around with platform-specific defines diff -r 2420733abeb6 -r 433e3aac9e52 src/dsp/KaiserWindow.h --- a/src/dsp/KaiserWindow.h Fri Jul 17 15:49:42 2015 +0100 +++ b/src/dsp/KaiserWindow.h Mon Sep 07 12:01:14 2015 +0100 @@ -35,6 +35,8 @@ #include #include +#include "pi.h" + /** * Kaiser window: A windower whose bandwidth and sidelobe height * (signal-noise ratio) can be specified. These parameters are traded diff -r 2420733abeb6 -r 433e3aac9e52 src/dsp/MathUtilities.h --- a/src/dsp/MathUtilities.h Fri Jul 17 15:49:42 2015 +0100 +++ b/src/dsp/MathUtilities.h Mon Sep 07 12:01:14 2015 +0100 @@ -35,6 +35,7 @@ #include #include "nan-inf.h" +#include "pi.h" /** * Static helper functions for simple mathematical calculations. diff -r 2420733abeb6 -r 433e3aac9e52 src/dsp/SincWindow.h --- a/src/dsp/SincWindow.h Fri Jul 17 15:49:42 2015 +0100 +++ b/src/dsp/SincWindow.h Mon Sep 07 12:01:14 2015 +0100 @@ -34,6 +34,8 @@ #include +#include "pi.h" + /** * A window containing values of the sinc function, i.e. sin(x)/x with * sinc(0) == 1, with x == 0 at the centre. diff -r 2420733abeb6 -r 433e3aac9e52 src/dsp/Window.h --- a/src/dsp/Window.h Fri Jul 17 15:49:42 2015 +0100 +++ b/src/dsp/Window.h Mon Sep 07 12:01:14 2015 +0100 @@ -29,14 +29,16 @@ authorization. */ -#ifndef _WINDOW_H_ -#define _WINDOW_H_ +#ifndef WINDOW_H +#define WINDOW_H #include #include #include #include +#include "pi.h" + enum WindowType { RectangularWindow, BartlettWindow, diff -r 2420733abeb6 -r 433e3aac9e52 src/dsp/pi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/dsp/pi.h Mon Sep 07 12:01:14 2015 +0100 @@ -0,0 +1,11 @@ + +#ifndef PI_H +#define PI_H + +#include + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + +#endif