[Scummvm-cvs-logs] SF.net SVN: scummvm: [29567] scummvm/trunk/sound/softsynth/pcspk.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Mon Nov 19 13:44:54 CET 2007
Revision: 29567
http://scummvm.svn.sourceforge.net/scummvm/?rev=29567&view=rev
Author: fingolfin
Date: 2007-11-19 04:44:54 -0800 (Mon, 19 Nov 2007)
Log Message:
-----------
Don't use M_PI, rather use our very own PI constant
Modified Paths:
--------------
scummvm/trunk/sound/softsynth/pcspk.cpp
Modified: scummvm/trunk/sound/softsynth/pcspk.cpp
===================================================================
--- scummvm/trunk/sound/softsynth/pcspk.cpp 2007-11-19 00:45:58 UTC (rev 29566)
+++ scummvm/trunk/sound/softsynth/pcspk.cpp 2007-11-19 12:44:54 UTC (rev 29567)
@@ -25,10 +25,6 @@
#include "sound/softsynth/pcspk.h"
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
namespace Audio {
const PCSpeaker::generatorFunc PCSpeaker::generateWave[] =
@@ -108,7 +104,7 @@
return 0;
// TODO: Maybe using a look-up-table would be better?
- return CLIP<int16>((int16) (128 * sin(2.0 * M_PI * x / oscLength)), -128, 127);
+ return CLIP<int16>((int16) (128 * sin(2.0 * PI * x / oscLength)), -128, 127);
}
int8 PCSpeaker::generateSaw(uint32 x, uint32 oscLength) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list