new chan osc, part 6

more adaptations

how can I get you out of my head... I want to go back to work!
This commit is contained in:
tildearrow 2025-03-02 04:11:10 -05:00
parent fe00ee805d
commit 6265d2cd39
27 changed files with 293 additions and 123 deletions

View file

@ -69,7 +69,11 @@ const char** DivPlatformNDS::getRegisterSheet() {
}
void DivPlatformNDS::acquire(short** buf, size_t len) {
for (size_t i=0; i<len; i++) {
for (int i=0; i<16; i++) {
oscBuf[i]->begin(len);
}
for (size_t h=0; h<len; h++) {
nds.tick(coreQuality);
int lout=((nds.loutput()-0x200)<<5); // scale to 16 bit
int rout=((nds.routput()-0x200)<<5); // scale to 16 bit
@ -77,13 +81,17 @@ void DivPlatformNDS::acquire(short** buf, size_t len) {
if (lout<-32768) lout=-32768;
if (rout>32767) rout=32767;
if (rout<-32768) rout=-32768;
buf[0][i]=lout;
buf[1][i]=rout;
buf[0][h]=lout;
buf[1][h]=rout;
for (int i=0; i<16; i++) {
oscBuf[i]->data[oscBuf[i]->needle++]=(nds.chan_lout(i)+nds.chan_rout(i))>>1;
oscBuf[i]->putSample(h,(nds.chan_lout(i)+nds.chan_rout(i))>>1);
}
}
for (int i=0; i<16; i++) {
oscBuf[i]->end(len);
}
}
u8 DivPlatformNDS::read_byte(u32 addr) {
@ -564,7 +572,7 @@ void DivPlatformNDS::setFlags(const DivConfig& flags) {
chipClock=33513982;
rate=chipClock/2/coreQuality;
for (int i=0; i<16; i++) {
oscBuf[i]->rate=rate;
oscBuf[i]->setRate(rate);
}
memCompo.capacity=(isDSi?16777216:4194304);
}