limit number of render pool threads to chip count
This commit is contained in:
parent
157f3be253
commit
a3cd0fa6ba
|
@ -3282,6 +3282,10 @@ void DivEngine::quitDispatch() {
|
|||
for (int i=0; i<DIV_MAX_CHANS; i++) {
|
||||
isMuted[i]=0;
|
||||
}
|
||||
if (renderPool!=NULL) {
|
||||
delete renderPool;
|
||||
renderPool=NULL;
|
||||
}
|
||||
BUSY_END;
|
||||
}
|
||||
|
||||
|
|
|
@ -1797,7 +1797,10 @@ void DivEngine::nextBuf(float** in, float** out, int inChans, int outChans, unsi
|
|||
std::chrono::steady_clock::time_point ts_processBegin=std::chrono::steady_clock::now();
|
||||
|
||||
if (renderPool==NULL) {
|
||||
renderPool=new DivWorkPool(renderPoolThreads);
|
||||
unsigned int howManyThreads=song.systemLen;
|
||||
if (howManyThreads<2) howManyThreads=0;
|
||||
if (howManyThreads>renderPoolThreads) howManyThreads=renderPoolThreads;
|
||||
renderPool=new DivWorkPool(howManyThreads);
|
||||
}
|
||||
|
||||
// process MIDI events (TODO: everything)
|
||||
|
|
Loading…
Reference in a new issue