VERA: fix custom clock

This commit is contained in:
tildearrow 2023-07-02 00:26:57 -05:00
parent f67faf9f23
commit 72ed5deeb1
2 changed files with 11 additions and 6 deletions

View file

@ -441,6 +441,15 @@ void DivPlatformVERA::poke(std::vector<DivRegWrite>& wlist) {
for (auto &i: wlist) poke(i.addr,i.val);
}
void DivPlatformVERA::setFlags(const DivConfig& flags) {
chipClock=25000000;
CHECK_CUSTOM_CLOCK;
rate=chipClock/512;
for (int i=0; i<17; i++) {
oscBuf[i]->rate=rate;
}
}
int DivPlatformVERA::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
for (int i=0; i<17; i++) {
isMuted[i]=false;
@ -451,12 +460,7 @@ int DivPlatformVERA::init(DivEngine* p, int channels, int sugRate, const DivConf
pcm=new struct VERA_PCM;
dumpWrites=false;
skipRegisterWrites=false;
chipClock=25000000;
CHECK_CUSTOM_CLOCK;
rate=chipClock/512;
for (int i=0; i<17; i++) {
oscBuf[i]->rate=rate;
}
setFlags(flags);
reset();
return 17;
}

View file

@ -70,6 +70,7 @@ class DivPlatformVERA: public DivDispatch {
void reset();
void tick(bool sysTick=true);
void muteChannel(int ch, bool mute);
void setFlags(const DivConfig& flags);
void notifyInsDeletion(void* ins);
float getPostAmp();
int getOutputCount();