PCE: Mednafen is wonderful

the PSG emulator already comes with heuristics... I stripped them off
for Furnace but now that we have acquireDirect() we can give it our
blip_buf and handle everything there

from 40-70% to 10% CPU usage on my phone, and highest quality!

TODO:
- PCM
- chan osc (should be very easy)
This commit is contained in:
tildearrow 2025-03-03 20:27:35 -05:00
parent f5589d0084
commit f0a3e3f590
4 changed files with 37 additions and 57 deletions

View file

@ -70,8 +70,6 @@ class DivPlatformPCE: public DivDispatch {
unsigned char lastPan;
int curChan;
int tempL[32];
int tempR[32];
unsigned char sampleBank, lfoMode, lfoSpeed;
int coreQuality;
PCE_PSG* pce;
@ -81,6 +79,7 @@ class DivPlatformPCE: public DivDispatch {
friend void putDispatchChan(void*,int,int);
public:
void acquire(short** buf, size_t len);
void acquireDirect(blip_buffer_t** bb, size_t off, size_t len);
int dispatch(DivCommand c);
void* getChanState(int chan);
DivMacroInt* getChanMacroInt(int ch);
@ -99,6 +98,7 @@ class DivPlatformPCE: public DivDispatch {
void muteChannel(int ch, bool mute);
int getOutputCount();
bool keyOffAffectsArp(int ch);
bool hasAcquireDirect();
void setCoreQuality(unsigned char q);
void setFlags(const DivConfig& flags);
void notifyWaveChange(int wave);