diff --git a/src/engine/dispatchContainer.cpp b/src/engine/dispatchContainer.cpp index b73aea2f..c30d7f23 100644 --- a/src/engine/dispatchContainer.cpp +++ b/src/engine/dispatchContainer.cpp @@ -86,16 +86,9 @@ void DivDispatchContainer::setRates(double gotRate) { int outs=dispatch->getOutputCount(); - int rate=dispatch->rate; - rateMul=0; - while (rateMul<8 && raterate,gotRate); } rateMemory=gotRate; } @@ -127,13 +120,7 @@ void DivDispatchContainer::grow(size_t size) { logE("not enough memory!"); \ return; \ } \ - int rate=dispatch->rate; \ - rateMul=0; \ - while (rateMul<8 && raterate,rateMemory); \ \ if (bbIn[i]==NULL) bbIn[i]=new short[bbInLen]; \ if (bbOut[i]==NULL) bbOut[i]=new short[bbInLen]; \ @@ -147,25 +134,6 @@ void DivDispatchContainer::grow(size_t size) { void DivDispatchContainer::acquire(size_t offset, size_t count) { CHECK_MISSING_BUFS; - if (rateMul) { - //logV("req: from %d to %d",offset,offset+count-1); - offset+=runPosSub; - size_t oldCount=count; - runPosSub=(runPosSub+oldCount)&((1<>=rateMul; - count>>=rateMul; - - if (offset!=0 && offset!=lastCount) { - logW("Shit! %d %d",offset,lastCount); - } - - lastCount=offset+count; - - //logV("got: from %d to %d",offset,offset+count-1); - } - for (int i=0; i=outs) { bbInMapped[i]=NULL; @@ -192,8 +160,6 @@ void DivDispatchContainer::flush(size_t count) { void DivDispatchContainer::fillBuf(size_t runtotal, size_t offset, size_t size) { CHECK_MISSING_BUFS; - int step=1<0) { dcOffCompensation=false; for (int i=0; igetDCOffRequired()) { dcOffCompensation=true; } diff --git a/src/engine/engine.h b/src/engine/engine.h index 077daf5d..d31de903 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -184,13 +184,12 @@ struct DivNoteEvent { struct DivDispatchContainer { DivDispatch* dispatch; blip_buffer_t* bb[DIV_MAX_OUTPUTS]; - size_t bbInLen, runtotal, runLeft, runPos, lastAvail, lastCount; + size_t bbInLen, runtotal, runLeft, runPos, lastAvail; int temp[DIV_MAX_OUTPUTS], prevSample[DIV_MAX_OUTPUTS]; short* bbInMapped[DIV_MAX_OUTPUTS]; short* bbIn[DIV_MAX_OUTPUTS]; short* bbOut[DIV_MAX_OUTPUTS]; bool lowQuality, dcOffCompensation; - unsigned char rateMul, runPosSub, fillSub; double rateMemory; void setRates(double gotRate); @@ -209,12 +208,8 @@ struct DivDispatchContainer { runLeft(0), runPos(0), lastAvail(0), - lastCount(0), lowQuality(false), dcOffCompensation(false), - rateMul(0), - runPosSub(0), - fillSub(0), rateMemory(0.0) { memset(bb,0,DIV_MAX_OUTPUTS*sizeof(blip_buffer_t*)); memset(temp,0,DIV_MAX_OUTPUTS*sizeof(int));