1
0
Fork 0

Fine tune autoturn algorithm a bit. Let's hope games are smart enough to turn the keys off if they don't use the adlib anymore. (ripsaw)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3501
This commit is contained in:
Peter Veenstra 2009-11-24 07:16:28 +00:00
parent c4053d3d98
commit e0f2a469db

View file

@ -549,7 +549,10 @@ static void OPL_CallBack(Bitu len) {
module->handler->Generate( module->mixerChan, len );
//Disable the sound generation after 30 seconds of silence
if ((PIC_Ticks - module->lastUsed) > 30000) {
module->mixerChan->Enable(false);
Bitu i;
for (i=0xb0;i<0xb9;i++) if (module->cache[i]&0x20||module->cache[i+0x100]&0x20) break;
if (i==0xb9) module->mixerChan->Enable(false);
else module->lastUsed = PIC_Ticks;
}
}