summaryrefslogtreecommitdiff
path: root/gst/audioresample
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2011-06-13 19:09:05 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2011-06-13 19:09:05 +0200
commit40d567153a304efd35b56f92d195337cbee38496 (patch)
treea9e26b2d349dc16c2433eb9ed22b042ffe311533 /gst/audioresample
parent9c54ca5254bd8ee0d55a6bacd4b33715674d15ac (diff)
parent4db89c82bb756e963e4a9c1d64f59f0c0e41d841 (diff)
downloadgstreamer-plugins-base-40d567153a304efd35b56f92d195337cbee38496.tar.gz
Merge branch 'master' into 0.11
Diffstat (limited to 'gst/audioresample')
-rw-r--r--gst/audioresample/resample.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
index 7d42f0e0f..a10c9f698 100644
--- a/gst/audioresample/resample.c
+++ b/gst/audioresample/resample.c
@@ -97,10 +97,6 @@ speex_free (void *ptr)
#include <math.h>
-#ifndef M_PI
-#define M_PI 3.14159263
-#endif
-
#ifdef FIXED_POINT
#define WORD2INT(x) ((x) < -32767 ? -32768 : ((x) > 32766 ? 32767 : (x)))
#else
@@ -323,7 +319,7 @@ sinc (float cutoff, float x, int N, struct FuncDef *window_func)
else if (fabs (x) > .5f * N)
return 0;
/*FIXME: Can it really be any slower than this? */
- return WORD2INT (32768. * cutoff * sin (M_PI * xx) / (M_PI * xx) *
+ return WORD2INT (32768. * cutoff * sin (G_PI * xx) / (G_PI * xx) *
compute_func (fabs (2. * x / N), window_func));
}
#else
@@ -346,7 +342,7 @@ sinc (float cutoff, float x, int N, struct FuncDef *window_func)
else if (fabs (x) > .5 * N)
return 0;
/*FIXME: Can it really be any slower than this? */
- return cutoff * sin (M_PI * xx) / (M_PI * xx) * compute_func (fabs (2. * x /
+ return cutoff * sin (G_PI * xx) / (G_PI * xx) * compute_func (fabs (2. * x /
N), window_func);
}
#endif