renderSamples optimization
only render sample types which are used stability remains to be tested
This commit is contained in:
parent
89ece073f6
commit
656de800cf
6 changed files with 119 additions and 96 deletions
|
|
@ -1015,9 +1015,17 @@ void DivEngine::renderSamples() {
|
|||
sPreview.pos=0;
|
||||
sPreview.dir=false;
|
||||
|
||||
// step 0: make sample format mask
|
||||
unsigned int formatMask=1U<<16; // 16-bit is always on
|
||||
for (int i=0; i<song.systemLen; i++) {
|
||||
const DivSysDef* s=getSystemDef(song.system[i]);
|
||||
if (s==NULL) continue;
|
||||
formatMask|=s->sampleFormatMask;
|
||||
}
|
||||
|
||||
// step 1: render samples
|
||||
for (int i=0; i<song.sampleLen; i++) {
|
||||
song.sample[i]->render();
|
||||
song.sample[i]->render(formatMask);
|
||||
}
|
||||
|
||||
// step 2: render samples to dispatch
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue