Skip to content

Commit d8dd26f

Browse files
1 parent ac48256 commit d8dd26f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/sid/xs_sidplay2.cc

+14
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@
4040
#include <libaudcore/runtime.h>
4141
#include <libaudcore/vfs.h>
4242

43+
#if (LIBSIDPLAYFP_VERSION_MAJ > 2) || \
44+
(LIBSIDPLAYFP_VERSION_MAJ == 2 && LIBSIDPLAYFP_VERSION_MIN >= 10)
45+
#define HAVE_SIDPLAYFP_2_10
46+
#endif
47+
4348
struct SidState {
4449
sidplayfp *currEng;
4550
sidbuilder *currBuilder;
@@ -99,11 +104,13 @@ bool xs_sidplayfp_init()
99104
return false;
100105
}
101106

107+
#ifndef HAVE_SIDPLAYFP_2_10
102108
state.currBuilder->filter(xs_cfg.emulateFilters);
103109
if (!state.currBuilder->getStatus()) {
104110
AUDERR("reSID->filter(%d) failed.\n", xs_cfg.emulateFilters);
105111
return false;
106112
}
113+
#endif
107114

108115
config.sidEmulation = state.currBuilder;
109116

@@ -139,6 +146,13 @@ bool xs_sidplayfp_init()
139146
return false;
140147
}
141148

149+
#ifdef HAVE_SIDPLAYFP_2_10
150+
/* Call filter() after config() to have an effect */
151+
state.currEng->filter(0, xs_cfg.emulateFilters);
152+
state.currEng->filter(1, xs_cfg.emulateFilters);
153+
state.currEng->filter(2, xs_cfg.emulateFilters);
154+
#endif
155+
142156
/* Load ROMs */
143157
VFSFile kernal_file("file://" SIDDATADIR "/sidplayfp/kernal", "r");
144158
VFSFile basic_file("file://" SIDDATADIR "/sidplayfp/basic", "r");

0 commit comments

Comments
 (0)