mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
POKEY: optimize ASAP core a lot
This commit is contained in:
parent
42367a5601
commit
84c4e48fbe
1 changed files with 11 additions and 6 deletions
|
@ -101,7 +101,7 @@ void DivPlatformPOKEY::acquireASAP(short* buf, size_t start, size_t len) {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t h=start; h<start+len; h++) {
|
for (size_t h=start; h<start+len; h++) {
|
||||||
if (++oscBufDelay>=14) {
|
if (++oscBufDelay>=2) {
|
||||||
oscBufDelay=0;
|
oscBufDelay=0;
|
||||||
buf[h]=altASAP->sampleAudio(oscBuf);
|
buf[h]=altASAP->sampleAudio(oscBuf);
|
||||||
} else {
|
} else {
|
||||||
|
@ -448,16 +448,21 @@ void DivPlatformPOKEY::setFlags(const DivConfig& flags) {
|
||||||
chipClock=COLOR_NTSC/2.0;
|
chipClock=COLOR_NTSC/2.0;
|
||||||
}
|
}
|
||||||
CHECK_CUSTOM_CLOCK;
|
CHECK_CUSTOM_CLOCK;
|
||||||
rate=chipClock;
|
|
||||||
for (int i=0; i<4; i++) {
|
|
||||||
oscBuf[i]->rate=rate/14;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useAltASAP) {
|
if (useAltASAP) {
|
||||||
|
rate=chipClock/7;
|
||||||
|
for (int i=0; i<4; i++) {
|
||||||
|
oscBuf[i]->rate=rate/2;
|
||||||
|
}
|
||||||
if (altASAP) {
|
if (altASAP) {
|
||||||
delete altASAP;
|
delete altASAP;
|
||||||
}
|
}
|
||||||
altASAP=new AltASAP::Pokey(chipClock, chipClock);
|
altASAP=new AltASAP::Pokey(chipClock,rate);
|
||||||
|
} else {
|
||||||
|
rate=chipClock;
|
||||||
|
for (int i=0; i<4; i++) {
|
||||||
|
oscBuf[i]->rate=rate/14;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue