-
Notifications
You must be signed in to change notification settings - Fork 3
/
playcfg.hpp
78 lines (66 loc) · 1.7 KB
/
playcfg.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#ifndef __PLAYCFG_HPP__
#define __PLAYCFG_HPP__
#include <stdtype.h>
#include <string>
#include <vector>
#include <array>
struct GeneralOptions
{
UINT32 smplRate;
UINT8 smplBits;
UINT32 pbRate;
double volume;
double pbSpeed;
UINT32 maxLoops;
UINT8 resmplMode;
UINT8 chipSmplMode;
UINT32 chipSmplRate;
UINT32 fadeTime;
UINT32 pauseTime_jingle;
UINT32 pauseTime_loop;
bool pseudoSurround;
bool preferJapTag;
bool showDevCore;
UINT8 hardStopOld;
bool immediateUpdate;
bool resetMuting;
bool noInfoCache;
std::string titleFormat;
bool appendFM2413;
bool trimWhitespace;
bool stdSeparators;
bool fidTagFallback; // Jap/Eng tag fallback for file info dialogue
UINT32 mediaLibFileType;
struct
{
bool vgm;
bool s98;
bool dro;
bool gym;
} fileTypes;
};
struct ChipOptions
{
UINT8 chipType;
UINT8 chipInstance;
UINT8 chipDisable; // bit mask, bit 0 (01) = main, bit 1 (02) = linked
UINT32 emuCore;
UINT32 emuCoreSub;
UINT8 emuType; // TODO: remove and use emuCore/emuCoreSub instead
UINT8 chnCnt[2]; // for now this is only used by panning code
UINT32 muteMask[2];
INT16 panMask[2][32]; // scale: -0x100 .. 0 .. +0x100
UINT32 addOpts;
};
struct PluginConfig
{
GeneralOptions genOpts;
std::vector< std::array<ChipOptions, 2> > chipOpts;
};
class PlayerA;
UINT32 EmuTypeNum2CoreFCC(UINT8 chipType, UINT8 emuType, bool* isSubType);
void LoadConfiguration(PluginConfig& pCfg, const char* iniFileName);
void SaveConfiguration(const PluginConfig& pCfg, const char* iniFileName);
void ApplyCfg_General(PlayerA& player, const GeneralOptions& opts, bool noLiveOpts = false);
void ApplyCfg_Chip(PlayerA& player, const GeneralOptions& gOpts, const ChipOptions& cOpts);
#endif // __PLAYCFG_HPP__