diff --git a/src/engine/platform/vera.cpp b/src/engine/platform/vera.cpp index 0845c4ea8..38b166bd1 100644 --- a/src/engine/platform/vera.cpp +++ b/src/engine/platform/vera.cpp @@ -144,6 +144,7 @@ void DivPlatformVERA::reset() { } chan[16].vol=15; chan[16].pan=3; + lastCenterRate=-1; } int DivPlatformVERA::calcNoteFreq(int ch, int note) { @@ -226,9 +227,9 @@ void DivPlatformVERA::tick(bool sysTick) { double off=65536.0; if (chan[16].pcm.sample>=0 && chan[16].pcm.samplesong.sampleLen) { DivSample* s=parent->getSample(chan[16].pcm.sample); + lastCenterRate=s->centerRate; if (s->centerRate>=1) { off=65536.0*(s->centerRate/8363.0); - lastCenterRate=s->centerRate; } } else if (lastCenterRate>=1) { off=65536.0*(lastCenterRate/8363.0); @@ -530,7 +531,6 @@ int DivPlatformVERA::init(DivEngine* p, int channels, int sugRate, const DivConf pcm=new struct VERA_PCM; dumpWrites=false; skipRegisterWrites=false; - lastCenterRate=-1; setFlags(flags); reset(); return 17;