1 /*
2 * This file is part of libsidplayfp, a SID player engine.
3 *
4 * Copyright 2011-2019 Leandro Nini <drfiemost@users.sourceforge.net>
5 * Copyright 2007-2010 Antti Lankila
6 * Copyright 2000-2001 Simon White
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 */
22
23 #include "SidConfig.h"
24
25 #include "mixer.h"
26
27 #include "sidcxx11.h"
28
SidConfig()29 SidConfig::SidConfig() :
30 defaultC64Model(PAL),
31 forceC64Model(false),
32 defaultSidModel(MOS6581),
33 forceSidModel(false),
34 digiBoost(false),
35 ciaModel(MOS6526),
36 playback(MONO),
37 frequency(DEFAULT_SAMPLING_FREQ),
38 secondSidAddress(0),
39 thirdSidAddress(0),
40 sidEmulation(nullptr),
41 leftVolume(libsidplayfp::Mixer::VOLUME_MAX),
42 rightVolume(libsidplayfp::Mixer::VOLUME_MAX),
43 powerOnDelay(DEFAULT_POWER_ON_DELAY),
44 samplingMethod(RESAMPLE_INTERPOLATE),
45 fastSampling(false)
46 {}
47
compare(const SidConfig & config)48 bool SidConfig::compare(const SidConfig &config)
49 {
50 return defaultC64Model != config.defaultC64Model
51 || forceC64Model != config.forceC64Model
52 || defaultSidModel != config.defaultSidModel
53 || forceSidModel != config.forceSidModel
54 || digiBoost != config.digiBoost
55 || ciaModel != config.ciaModel
56 || playback != config.playback
57 || frequency != config.frequency
58 || secondSidAddress != config.secondSidAddress
59 || thirdSidAddress != config.thirdSidAddress
60 || sidEmulation != config.sidEmulation
61 || leftVolume != config.leftVolume
62 || rightVolume != config.rightVolume
63 || powerOnDelay != config.powerOnDelay
64 || samplingMethod != config.samplingMethod
65 || fastSampling != config.fastSampling;
66 }
67