help how does this work

This commit is contained in:
tildearrow 2022-02-28 03:50:45 -05:00
parent 539182e643
commit 4218440af1

View file

@ -75,6 +75,10 @@ const char* DivPlatformOPLL::getEffectName(unsigned char effect) {
return NULL; return NULL;
} }
const unsigned char cycleMapOPLL[18]={
1, 2, 0, 1, 2, 3, 4, 5, 3, 4, 5, 6, 7, 8, 6, 7, 8, 0
};
void DivPlatformOPLL::acquire_nuked(short* bufL, short* bufR, size_t start, size_t len) { void DivPlatformOPLL::acquire_nuked(short* bufL, short* bufR, size_t start, size_t len) {
static int o[2]; static int o[2];
static int os; static int os;
@ -99,9 +103,12 @@ void DivPlatformOPLL::acquire_nuked(short* bufL, short* bufR, size_t start, size
} }
} }
unsigned char nextOut=cycleMapOPLL[(fm.cycles+17)%18];
OPLL_Clock(&fm,o); OPLL_Clock(&fm,o);
if (!isMuted[nextOut]) {
os+=(o[0]+o[1]); os+=(o[0]+o[1]);
} }
}
os*=50; os*=50;
if (os<-32768) os=-32768; if (os<-32768) os=-32768;
if (os>32767) os=32767; if (os>32767) os=32767;