VERA/ZSM: remember last sample played so that async pitch changes work on ZSM export
This commit is contained in:
parent
52e0c7f430
commit
b83cc98eb1
|
@ -230,7 +230,12 @@ void DivPlatformVERA::tick(bool sysTick) {
|
||||||
off=65536.0;
|
off=65536.0;
|
||||||
} else {
|
} else {
|
||||||
off=65536.0*(s->centerRate/8363.0);
|
off=65536.0*(s->centerRate/8363.0);
|
||||||
|
lastCenterRate=s->centerRate;
|
||||||
}
|
}
|
||||||
|
} else if (lastCenterRate<1) {
|
||||||
|
off=65536.0;
|
||||||
|
} else {
|
||||||
|
off=65536.0*(lastCenterRate/8363.0);
|
||||||
}
|
}
|
||||||
chan[16].freq=parent->calcFreq(chan[16].baseFreq,chan[16].pitch,chan[16].fixedArp?chan[16].baseNoteOverride:chan[16].arpOff,chan[16].fixedArp,false,8,chan[16].pitch2,chipClock,off);
|
chan[16].freq=parent->calcFreq(chan[16].baseFreq,chan[16].pitch,chan[16].fixedArp?chan[16].baseNoteOverride:chan[16].arpOff,chan[16].fixedArp,false,8,chan[16].pitch2,chipClock,off);
|
||||||
if (chan[16].freq>128) chan[16].freq=128;
|
if (chan[16].freq>128) chan[16].freq=128;
|
||||||
|
@ -529,6 +534,7 @@ int DivPlatformVERA::init(DivEngine* p, int channels, int sugRate, const DivConf
|
||||||
pcm=new struct VERA_PCM;
|
pcm=new struct VERA_PCM;
|
||||||
dumpWrites=false;
|
dumpWrites=false;
|
||||||
skipRegisterWrites=false;
|
skipRegisterWrites=false;
|
||||||
|
lastCenterRate=-1;
|
||||||
setFlags(flags);
|
setFlags(flags);
|
||||||
reset();
|
reset();
|
||||||
return 17;
|
return 17;
|
||||||
|
|
|
@ -54,6 +54,7 @@ class DivPlatformVERA: public DivDispatch {
|
||||||
unsigned char regPool[69];
|
unsigned char regPool[69];
|
||||||
struct VERA_PSG* psg;
|
struct VERA_PSG* psg;
|
||||||
struct VERA_PCM* pcm;
|
struct VERA_PCM* pcm;
|
||||||
|
int lastCenterRate;
|
||||||
|
|
||||||
int calcNoteFreq(int ch, int note);
|
int calcNoteFreq(int ch, int note);
|
||||||
friend void putDispatchChip(void*,int);
|
friend void putDispatchChip(void*,int);
|
||||||
|
|
Loading…
Reference in a new issue