aboutsummaryrefslogtreecommitdiff
path: root/video/codecs/qdm2.cpp
diff options
context:
space:
mode:
authormd52011-03-19 02:29:22 +0200
committermd52011-03-19 02:29:22 +0200
commit19d3972f1673c5cb5fe6bd0521044b3d95f4bff6 (patch)
tree1605392be53069a06885a40e7cc1ffc3d28b20bb /video/codecs/qdm2.cpp
parent0eb2c4709ebba9b8c63c7e42be3ba83e109ecbc5 (diff)
downloadscummvm-rg350-19d3972f1673c5cb5fe6bd0521044b3d95f4bff6.tar.gz
scummvm-rg350-19d3972f1673c5cb5fe6bd0521044b3d95f4bff6.tar.bz2
scummvm-rg350-19d3972f1673c5cb5fe6bd0521044b3d95f4bff6.zip
VIDEO: Changed several places that use PI to use M_PI instead
Diffstat (limited to 'video/codecs/qdm2.cpp')
-rw-r--r--video/codecs/qdm2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/codecs/qdm2.cpp b/video/codecs/qdm2.cpp
index d592548580..c7e1ffe54f 100644
--- a/video/codecs/qdm2.cpp
+++ b/video/codecs/qdm2.cpp
@@ -448,7 +448,7 @@ float *ff_cos_tabs[] = {
void initCosineTables(int index) {
int m = 1 << index;
- double freq = 2 * PI / m;
+ double freq = 2 * M_PI / m;
float *tab = ff_cos_tabs[index];
for (int i = 0; i <= m / 4; i++)
@@ -776,7 +776,7 @@ int fftInit(FFTContext *s, int nbits, int inverse) {
s->tmpBuf = (FFTComplex *)malloc(n * sizeof(FFTComplex));
} else {
for (i = 0; i < n / 2; i++) {
- alpha = 2 * PI * (float)i / (float)n;
+ alpha = 2 * M_PI * (float)i / (float)n;
c1 = cos(alpha);
s1 = sin(alpha) * s2;
s->exptab[i].re = c1;
@@ -814,7 +814,7 @@ int fftInit(FFTContext *s, int nbits, int inverse) {
*/
int rdftInit(RDFTContext *s, int nbits, RDFTransformType trans) {
int n = 1 << nbits;
- const double theta = (trans == RDFT || trans == IRIDFT ? -1 : 1) * 2 * PI / n;
+ const double theta = (trans == RDFT || trans == IRIDFT ? -1 : 1) * 2 * M_PI / n;
s->nbits = nbits;
s->inverse = trans == IRDFT || trans == IRIDFT;
@@ -3009,7 +3009,7 @@ void QDM2Stream::qdm2_fft_generate_tone(FFTTone *tone)
float level, f[6];
int i;
QDM2Complex c;
- const double iscale = 2.0 * PI / 512.0;
+ const double iscale = 2.0 * M_PI / 512.0;
tone->phase += tone->phase_shift;
@@ -3050,7 +3050,7 @@ void QDM2Stream::qdm2_fft_generate_tone(FFTTone *tone)
void QDM2Stream::qdm2_fft_tone_synthesizer(uint8 sub_packet) {
int i, j, ch;
- const double iscale = 0.25 * PI;
+ const double iscale = 0.25 * M_PI;
for (ch = 0; ch < _channels; ch++) {
memset(_fft.complex[ch], 0, _frameSize * sizeof(QDM2Complex));