diff --git a/reSID/envelope.cc b/reSID/envelope.cc index 14e93e3..915c4c4 100644 --- a/reSID/envelope.cc +++ b/reSID/envelope.cc @@ -98,7 +98,7 @@ void EnvelopeGenerator::reset() // The described method is thus sufficient for exact calculation of the rate // periods. // -reg16 EnvelopeGenerator::rate_counter_period[] = { +const reg16 EnvelopeGenerator::rate_counter_period[] = { 9, // 2ms*1.0MHz/256 = 7.81 32, // 8ms*1.0MHz/256 = 31.25 63, // 16ms*1.0MHz/256 = 62.50 @@ -155,7 +155,7 @@ reg16 EnvelopeGenerator::rate_counter_period[] = { // envelope counter are compared to the 4-bit sustain value. // This has been verified by sampling ENV3. // -reg8 EnvelopeGenerator::sustain_level[] = { +const reg8 EnvelopeGenerator::sustain_level[] = { 0x00, 0x11, 0x22, diff --git a/reSID/envelope.h b/reSID/envelope.h index 5574953..7fd86ee 100644 --- a/reSID/envelope.h +++ b/reSID/envelope.h @@ -71,10 +71,10 @@ protected: // Lookup table to convert from attack, decay, or release value to rate // counter period. - static reg16 rate_counter_period[]; + static const reg16 rate_counter_period[]; // The 16 selectable sustain levels. - static reg8 sustain_level[]; + static const reg8 sustain_level[]; friend class SID; }; diff --git a/reSID/filter.cc b/reSID/filter.cc index ecd7415..83deb4e 100644 --- a/reSID/filter.cc +++ b/reSID/filter.cc @@ -44,7 +44,7 @@ RESID_NAMESPACE_START // NB! Cutoff frequency characteristics may vary, we have modeled two // particular Commodore 64s. -fc_point Filter::f0_points_6581[] = +const fc_point Filter::f0_points_6581[] = { // FC f FCHI FCLO // ---------------------------- @@ -81,7 +81,7 @@ fc_point Filter::f0_points_6581[] = { 2047, 18000 } // 0xff 0x07 - repeated end point }; -fc_point Filter::f0_points_8580[] = +const fc_point Filter::f0_points_8580[] = { // FC f FCHI FCLO // ---------------------------- diff --git a/reSID/filter.h b/reSID/filter.h index 1ebcc56..4afbb68 100644 --- a/reSID/filter.h +++ b/reSID/filter.h @@ -193,9 +193,9 @@ protected: sound_sample f0_6581[2048]; sound_sample f0_8580[2048]; sound_sample* f0; - static fc_point f0_points_6581[]; - static fc_point f0_points_8580[]; - fc_point* f0_points; + const static fc_point f0_points_6581[]; + const static fc_point f0_points_8580[]; + const fc_point* f0_points; int f0_count; friend class SID;