reduce clicking on play/loop

This commit is contained in:
tildearrow 2022-01-19 21:04:51 -05:00
parent 0e346f5d73
commit 18df843864
2 changed files with 7 additions and 5 deletions

View file

@ -75,10 +75,12 @@ void DivDispatchContainer::fillBuf(size_t runtotal, size_t size) {
void DivDispatchContainer::clear() { void DivDispatchContainer::clear() {
blip_clear(bb[0]); blip_clear(bb[0]);
blip_clear(bb[1]); blip_clear(bb[1]);
temp[0]=0; // run for one cycle to determine DC offset
temp[1]=0; dispatch->acquire(bbIn[0],bbIn[1],0,1);
prevSample[0]=0; temp[0]=bbIn[0][0];
prevSample[1]=0; temp[1]=bbIn[1][0];
prevSample[0]=temp[0];
prevSample[1]=temp[1];
} }
void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, bool pal) { void DivDispatchContainer::init(DivSystem sys, DivEngine* eng, int chanCount, double gotRate, bool pal) {

View file

@ -2750,8 +2750,8 @@ void DivEngine::reset() {
} }
globalPitch=0; globalPitch=0;
for (int i=0; i<song.systemLen; i++) { for (int i=0; i<song.systemLen; i++) {
disCont[i].clear();
disCont[i].dispatch->reset(); disCont[i].dispatch->reset();
disCont[i].clear();
} }
} }