Skip to content

Commit

Permalink
Whoops, restore backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Jan 14, 2024
1 parent 7d1f317 commit 7dc6cce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/IniConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ void IniConfig::clear()
emulation_s.filterRange6581 = 0.5;
#endif
emulation_s.filterCurve8580 = 0.5;
#ifdef FEAT_CW_STRENGTH
emulation_s.combinedWaveformsStrength = SidConfig::AVERAGE;
#endif
emulation_s.powerOnDelay = -1;
emulation_s.samplingMethod = SidConfig::RESAMPLE_INTERPOLATE;
emulation_s.fastSampling = false;
Expand Down Expand Up @@ -435,6 +437,7 @@ void IniConfig::readEmulation(iniHandler &ini)
#endif
readDouble(ini, TEXT("FilterCurve8580"), emulation_s.filterCurve8580);

#ifdef FEAT_CW_STRENGTH
{
SID_STRING str = readString(ini, TEXT("CombinedWaveforms"));
if (!str.empty())
Expand All @@ -447,6 +450,7 @@ void IniConfig::readEmulation(iniHandler &ini)
emulation_s.combinedWaveformsStrength = SidConfig::STRONG;
}
}
#endif

readInt(ini, TEXT("PowerOnDelay"), emulation_s.powerOnDelay);

Expand Down
2 changes: 2 additions & 0 deletions src/IniConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ class IniConfig
double filterRange6581;
#endif
double filterCurve8580;
#ifdef FEAT_CW_STRENGTH
SidConfig::sid_cw_t combinedWaveformsStrength;
#endif
int powerOnDelay;
SidConfig::sampling_method_t samplingMethod;
bool fastSampling;
Expand Down
4 changes: 4 additions & 0 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,9 @@ ConsolePlayer::ConsolePlayer (const char * const name) :
m_filter.filterRange6581 = emulation.filterRange6581;
#endif
m_filter.filterCurve8580 = emulation.filterCurve8580;
#ifdef FEAT_CW_STRENGTH
m_combinedWaveformsStrength = emulation.combinedWaveformsStrength;
#endif

if (emulation.powerOnDelay >= 0)
m_engCfg.powerOnDelay = emulation.powerOnDelay;
Expand Down Expand Up @@ -596,7 +598,9 @@ bool ConsolePlayer::createSidEmu (SIDEMUS emu, const SidTuneInfo *tuneInfo)
rs->create ((m_engine.info ()).maxsids());
if (!rs->getStatus()) goto createSidEmu_error;

#ifdef FEAT_CW_STRENGTH
rs->combinedWaveformsStrength(m_combinedWaveformsStrength);
#endif

#ifdef FEAT_FILTER_RANGE
double frange = -1.0;
Expand Down
2 changes: 2 additions & 0 deletions src/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ class ConsolePlayer

double m_fcurve;

#ifdef FEAT_CW_STRENGTH
SidConfig::sid_cw_t m_combinedWaveformsStrength;
#endif

uint8_t m_registers[3][32];
uint16_t* m_freqTable;
Expand Down

0 comments on commit 7dc6cce

Please sign in to comment.