POKEY: optimize ASAP core a bit
This commit is contained in:
parent
05d389adac
commit
42367a5601
|
@ -454,7 +454,10 @@ void DivPlatformPOKEY::setFlags(const DivConfig& flags) {
|
|||
}
|
||||
|
||||
if (useAltASAP) {
|
||||
altASAP=std::make_unique<AltASAP::Pokey>(chipClock, chipClock);
|
||||
if (altASAP) {
|
||||
delete altASAP;
|
||||
}
|
||||
altASAP=new AltASAP::Pokey(chipClock, chipClock);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -471,6 +474,7 @@ int DivPlatformPOKEY::init(DivEngine* p, int channels, int sugRate, const DivCon
|
|||
dumpWrites=false;
|
||||
skipRegisterWrites=false;
|
||||
oscBufDelay=0;
|
||||
altASAP=NULL;
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
|
@ -489,6 +493,9 @@ void DivPlatformPOKEY::quit() {
|
|||
for (int i=0; i<4; i++) {
|
||||
delete oscBuf[i];
|
||||
}
|
||||
if (altASAP) {
|
||||
delete altASAP;
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformPOKEY::setAltASAP(bool value) {
|
||||
|
|
|
@ -52,7 +52,7 @@ class DivPlatformPOKEY: public DivDispatch {
|
|||
bool audctlChanged;
|
||||
unsigned char oscBufDelay;
|
||||
PokeyState pokey;
|
||||
std::unique_ptr<AltASAP::Pokey> altASAP;
|
||||
AltASAP::Pokey* altASAP;
|
||||
bool useAltASAP;
|
||||
unsigned char regPool[16];
|
||||
friend void putDispatchChip(void*,int);
|
||||
|
|
Loading…
Reference in New Issue