chip flags rewrite, part 4 - DO NOT USE

the next part is to drop systemFlagsOld completely
and then to fix the GUI
This commit is contained in:
tildearrow 2022-09-29 20:13:40 -05:00
parent ee6e0aa0e0
commit 48db9a1d0c
109 changed files with 532 additions and 377 deletions

View file

@ -382,18 +382,17 @@ void DivPlatformPCMDAC::notifyInsDeletion(void* ins) {
chan.std.notifyInsDeletion((DivInstrument*)ins);
}
void DivPlatformPCMDAC::setFlags(unsigned int flags) {
void DivPlatformPCMDAC::setFlags(const DivConfig& flags) {
// default to 44100Hz 16-bit stereo
if (!flags) flags=0x1f0000|44099;
rate=(flags&0xffff)+1;
rate=flags.getInt("rate",44100);
// rate can't be too low or the resampler will break
if (rate<1000) rate=1000;
chipClock=rate;
outDepth=(flags>>16)&0xf;
outStereo=(flags>>20)&1;
outDepth=(flags.getInt("outDepth",15))&15;
outStereo=flags.getBool("stereo",true);
}
int DivPlatformPCMDAC::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
int DivPlatformPCMDAC::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
parent=p;
dumpWrites=false;
skipRegisterWrites=false;