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

@ -13,7 +13,7 @@
#define FREQ_BASE 1712.0f*2
void DivPlatformPCE::acquire(short** buf, size_t start, size_t len) {
void DivPlatformPCE::acquire(short* bufL, short* bufR, size_t start, size_t len) {
for (size_t h=start; h<start+len; h++) {
// PCM part
for (int i=0; i<6; i++) {
@ -47,8 +47,8 @@ void DivPlatformPCE::acquire(short** buf, size_t start, size_t len) {
pce->ResetTS(0);
//printf("tempL: %d tempR: %d\n",tempL,tempR);
buf[0][h]=tempL;
buf[1][h]=tempR;
bufL[h]=tempL;
bufR[h]=tempR;
}
}
@ -250,6 +250,10 @@ int DivPlatformPCE::dispatch(DivCommand c) {
return 1;
}
bool DivPlatformPCE::isStereo() {
return true;
}
int DivPlatformPCE::init(DivEngine* p, int channels, int sugRate) {
parent=p;
rate=1789773;