more optimization

as of now non-stereo sound chips are only processed once
This commit is contained in:
tildearrow 2021-12-06 16:51:18 -05:00
parent 6efcfc2e8a
commit d6fb6b0bb3
17 changed files with 66 additions and 41 deletions

View file

@ -12,7 +12,7 @@ static unsigned char konOffs[6]={
0, 1, 2, 4, 5, 6
};
void DivPlatformGenesis::acquire(short** buf, size_t start, size_t len) {
void DivPlatformGenesis::acquire(short* bufL, short* bufR, size_t start, size_t len) {
static short o[2];
static int os[2];
@ -63,8 +63,8 @@ void DivPlatformGenesis::acquire(short** buf, size_t start, size_t len) {
psgClocks-=rate;
}
buf[0][h]=(os[0]<<5)+psgOut;
buf[1][h]=(os[1]<<5)+psgOut;
bufL[h]=(os[0]<<5)+psgOut;
bufR[h]=(os[1]<<5)+psgOut;
}
}
@ -340,6 +340,10 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
return 1;
}
bool DivPlatformGenesis::isStereo() {
return true;
}
int DivPlatformGenesis::init(DivEngine* p, int channels, int sugRate) {
parent=p;
rate=213068;