diff --git a/src/engine/platform/vera.cpp b/src/engine/platform/vera.cpp index 2305a2a68..0845c4ea8 100644 --- a/src/engine/platform/vera.cpp +++ b/src/engine/platform/vera.cpp @@ -226,15 +226,11 @@ 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); - if (s->centerRate<1) { - off=65536.0; - } else { + if (s->centerRate>=1) { off=65536.0*(s->centerRate/8363.0); lastCenterRate=s->centerRate; } - } else if (lastCenterRate<1) { - off=65536.0; - } else { + } else if (lastCenterRate>=1) { 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);