diff options
| author | dhewg | 2011-03-19 11:24:06 +0100 |
|---|---|---|
| committer | dhewg | 2011-03-19 11:24:06 +0100 |
| commit | 2def212de75b3885738c4db188f0a42b712bd48f (patch) | |
| tree | 03657dca73b120b0e80c73346dac1e47ec543d6a /audio | |
| parent | a4c05b1632940b3f2003055e0c64970b4b053f32 (diff) | |
| download | scummvm-rg350-2def212de75b3885738c4db188f0a42b712bd48f.tar.gz scummvm-rg350-2def212de75b3885738c4db188f0a42b712bd48f.tar.bz2 scummvm-rg350-2def212de75b3885738c4db188f0a42b712bd48f.zip | |
ALL: s/PI/M_PI/
Tip of the day: git grep -w PI
Diffstat (limited to 'audio')
| -rw-r--r-- | audio/softsynth/opl/dbopl.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/audio/softsynth/opl/dbopl.cpp b/audio/softsynth/opl/dbopl.cpp index 47e263b6b9..2c46cfee75 100644 --- a/audio/softsynth/opl/dbopl.cpp +++ b/audio/softsynth/opl/dbopl.cpp @@ -41,10 +41,6 @@ namespace OPL { namespace DOSBox { -#ifndef PI -#define PI 3.14159265358979323846 -#endif - namespace DBOPL { #define OPLRATE ((double)(14318180.0 / 288.0)) @@ -1392,7 +1388,7 @@ void InitTables( void ) { //Add 0.5 for the trunc rounding of the integer cast //Do a PI sinetable instead of the original 0.5 PI for ( int i = 0; i < 512; i++ ) { - SinTable[i] = (Bit16s)( 0.5 - log10( sin( (i + 0.5) * (PI / 512.0) ) ) / log10(2.0)*256 ); + SinTable[i] = (Bit16s)( 0.5 - log10( sin( (i + 0.5) * (M_PI / 512.0) ) ) / log10(2.0)*256 ); } #endif #if ( DBOPL_WAVE == WAVE_TABLEMUL ) @@ -1406,7 +1402,7 @@ void InitTables( void ) { //Sine Wave Base for ( int i = 0; i < 512; i++ ) { - WaveTable[ 0x0200 + i ] = (Bit16s)(sin( (i + 0.5) * (PI / 512.0) ) * 4084); + WaveTable[ 0x0200 + i ] = (Bit16s)(sin( (i + 0.5) * (M_PI / 512.0) ) * 4084); WaveTable[ 0x0000 + i ] = -WaveTable[ 0x200 + i ]; } //Exponential wave @@ -1418,7 +1414,7 @@ void InitTables( void ) { #if ( DBOPL_WAVE == WAVE_TABLELOG ) //Sine Wave Base for ( int i = 0; i < 512; i++ ) { - WaveTable[ 0x0200 + i ] = (Bit16s)( 0.5 - log10( sin( (i + 0.5) * (PI / 512.0) ) ) / log10(2.0)*256 ); + WaveTable[ 0x0200 + i ] = (Bit16s)( 0.5 - log10( sin( (i + 0.5) * (M_PI / 512.0) ) ) / log10(2.0)*256 ); WaveTable[ 0x0000 + i ] = ((Bit16s)0x8000) | WaveTable[ 0x200 + i]; } //Exponential wave |
