From 513c7af9bca7142f81f840759305e6b67b292a21 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 24 Sep 2008 09:33:01 +0000 Subject: [PATCH] fixed compiler warnings git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1708 0778d3d1-df1d-0410-868b-ea421aaaa00d --- plugins/sid/filter.cc | 4 ++-- plugins/sid/sid.cc | 12 ++++++++++++ plugins/sid/sid.h | 14 +++++++------- plugins/sid/wave.cc | 8 ++++---- 4 files changed, 25 insertions(+), 13 deletions(-) diff --git a/plugins/sid/filter.cc b/plugins/sid/filter.cc index fc603fbd4..fb548e30a 100644 --- a/plugins/sid/filter.cc +++ b/plugins/sid/filter.cc @@ -220,13 +220,13 @@ void Filter::reset() // ---------------------------------------------------------------------------- void Filter::writeFC_LO(reg8 fc_lo) { - fc = fc & 0x7f8 | fc_lo & 0x007; + fc = ( fc & 0x7f8 ) | ( fc_lo & 0x007 ); set_w0(); } void Filter::writeFC_HI(reg8 fc_hi) { - fc = (fc_hi << 3) & 0x7f8 | fc & 0x007; + fc = ( (fc_hi << 3) & 0x7f8 ) | ( fc & 0x007 ); set_w0(); } diff --git a/plugins/sid/sid.cc b/plugins/sid/sid.cc index 08ac866d1..c6e234fe0 100644 --- a/plugins/sid/sid.cc +++ b/plugins/sid/sid.cc @@ -20,6 +20,18 @@ #include "sid.h" #include + +const int cSID::FIR_N = 125; +const int cSID::FIR_RES_INTERPOLATE = 285; +const int cSID::FIR_RES_FAST = 51473; +const int cSID::FIR_SHIFT = 15; +const int cSID::RINGSIZE = 16384; + + // Fixpoint constants (16.16 bits). +const int cSID::FIXP_SHIFT = 16; +const int cSID::FIXP_MASK = 0xffff; + + // ---------------------------------------------------------------------------- // Constructor. // ---------------------------------------------------------------------------- diff --git a/plugins/sid/sid.h b/plugins/sid/sid.h index d5aaee244..0f596a556 100644 --- a/plugins/sid/sid.h +++ b/plugins/sid/sid.h @@ -117,15 +117,15 @@ protected: // http://www-ccrma.stanford.edu/~jos/resample/Choice_Table_Size.html // For a resolution of 16 bits this yields L >= 285 and L >= 51473, // respectively. - static const int FIR_N = 125; - static const int FIR_RES_INTERPOLATE = 285; - static const int FIR_RES_FAST = 51473; - static const int FIR_SHIFT = 15; - static const int RINGSIZE = 16384; + static const int FIR_N; + static const int FIR_RES_INTERPOLATE; + static const int FIR_RES_FAST; + static const int FIR_SHIFT; + static const int RINGSIZE; // Fixpoint constants (16.16 bits). - static const int FIXP_SHIFT = 16; - static const int FIXP_MASK = 0xffff; + static const int FIXP_SHIFT; + static const int FIXP_MASK; // Sampling variables. sampling_method sampling; diff --git a/plugins/sid/wave.cc b/plugins/sid/wave.cc index fbcb58c12..a72abd645 100644 --- a/plugins/sid/wave.cc +++ b/plugins/sid/wave.cc @@ -68,22 +68,22 @@ void WaveformGenerator::set_chip_model(chip_model model) // ---------------------------------------------------------------------------- void WaveformGenerator::writeFREQ_LO(reg8 freq_lo) { - freq = freq & 0xff00 | freq_lo & 0x00ff; + freq = ( freq & 0xff00 ) | ( freq_lo & 0x00ff ); } void WaveformGenerator::writeFREQ_HI(reg8 freq_hi) { - freq = (freq_hi << 8) & 0xff00 | freq & 0x00ff; + freq = ( (freq_hi << 8) & 0xff00 ) | ( freq & 0x00ff ); } void WaveformGenerator::writePW_LO(reg8 pw_lo) { - pw = pw & 0xf00 | pw_lo & 0x0ff; + pw = ( pw & 0xf00 ) | ( pw_lo & 0x0ff ); } void WaveformGenerator::writePW_HI(reg8 pw_hi) { - pw = (pw_hi << 8) & 0xf00 | pw & 0x0ff; + pw = ( (pw_hi << 8) & 0xf00 ) | ( pw & 0x0ff ); } void WaveformGenerator::writeCONTROL_REG(reg8 control)