libsidplayfp  2.0.2
SidConfig.h
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 #ifndef SIDCONFIG_H
24 #define SIDCONFIG_H
25 
26 #include <stdint.h>
27 
28 #include "sidplayfp/siddefs.h"
29 
30 
31 class sidbuilder;
32 
39 class SID_EXTERN SidConfig
40 {
41 public:
43  typedef enum
44  {
45  MONO = 1,
46  STEREO
47  } playback_t;
48 
50  typedef enum
51  {
52  MOS6581,
53  MOS8580
54  } sid_model_t;
55 
57  typedef enum
58  {
59  MOS6526,
60  MOS8521
61  } cia_model_t;
62 
64  typedef enum
65  {
66  PAL,
67  NTSC,
68  OLD_NTSC,
69  DREAN,
70  PAL_M
71  } c64_model_t;
72 
74  typedef enum
75  {
76  INTERPOLATE,
77  RESAMPLE_INTERPOLATE
78  } sampling_method_t;
79 
80 public:
86  static const uint_least16_t MAX_POWER_ON_DELAY = 0x1FFF;
87  static const uint_least16_t DEFAULT_POWER_ON_DELAY = MAX_POWER_ON_DELAY + 1;
88 
89  static const uint_least32_t DEFAULT_SAMPLING_FREQ = 44100;
90 
91 public:
101 
106 
113 
118 
122  bool digiBoost;
123 
130 
137 
141  uint_least32_t frequency;
142 
147  uint_least16_t secondSidAddress;
148  uint_least16_t thirdSidAddress;
150 
156 
160  uint_least32_t leftVolume;
161 
165  uint_least32_t rightVolume;
166 
170  uint_least16_t powerOnDelay;
171 
178 
184 
190  bool compare(const SidConfig &config);
191 
192 public:
193  SidConfig();
194 };
195 
196 #endif // SIDCONFIG_H
SidConfig::ciaModel
cia_model_t ciaModel
Definition: SidConfig.h:129
SidConfig::rightVolume
uint_least32_t rightVolume
Definition: SidConfig.h:165
SidConfig::forceC64Model
bool forceC64Model
Definition: SidConfig.h:105
SidConfig::sampling_method_t
sampling_method_t
Sampling method.
Definition: SidConfig.h:75
SidConfig::powerOnDelay
uint_least16_t powerOnDelay
Definition: SidConfig.h:170
SidConfig::digiBoost
bool digiBoost
Definition: SidConfig.h:122
SidConfig::playback
playback_t playback
Definition: SidConfig.h:136
SidConfig
Definition: SidConfig.h:40
SidConfig::sidEmulation
sidbuilder * sidEmulation
Definition: SidConfig.h:155
SidConfig::c64_model_t
c64_model_t
C64 model.
Definition: SidConfig.h:65
sidbuilder
Definition: sidbuilder.h:41
SidConfig::samplingMethod
sampling_method_t samplingMethod
Definition: SidConfig.h:177
SidConfig::defaultC64Model
c64_model_t defaultC64Model
Definition: SidConfig.h:100
SidConfig::frequency
uint_least32_t frequency
Definition: SidConfig.h:141
SidConfig::defaultSidModel
sid_model_t defaultSidModel
Definition: SidConfig.h:112
SidConfig::leftVolume
uint_least32_t leftVolume
Definition: SidConfig.h:160
SidConfig::playback_t
playback_t
Playback mode.
Definition: SidConfig.h:44
SidConfig::fastSampling
bool fastSampling
Definition: SidConfig.h:183
SidConfig::secondSidAddress
uint_least16_t secondSidAddress
Definition: SidConfig.h:147
SidConfig::forceSidModel
bool forceSidModel
Definition: SidConfig.h:117
SidConfig::cia_model_t
cia_model_t
CIA chip model.
Definition: SidConfig.h:58
SidConfig::sid_model_t
sid_model_t
SID chip model.
Definition: SidConfig.h:51