new chan osc, part 7
i am done
This commit is contained in:
parent
6265d2cd39
commit
49a8693dcb
35 changed files with 606 additions and 217 deletions
|
|
@ -256,6 +256,10 @@ void DivPlatformYM2610::acquire_combo(short** buf, size_t len) {
|
|||
adpcmAChan[i]=aae->debug_channel(i);
|
||||
}
|
||||
|
||||
for (int i=0; i<17; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
}
|
||||
|
||||
for (size_t h=0; h<len; h++) {
|
||||
// AY -> OPN
|
||||
ay->runDAC();
|
||||
|
|
@ -338,19 +342,23 @@ void DivPlatformYM2610::acquire_combo(short** buf, size_t len) {
|
|||
|
||||
|
||||
for (int i=0; i<(psgChanOffs-isCSM); i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(fm_nuked.ch_out[bchOffs[i]]<<1,-32768,32767);
|
||||
oscBuf[i]->putSample(h,CLAMP(fm_nuked.ch_out[bchOffs[i]]<<1,-32768,32767));
|
||||
}
|
||||
|
||||
ssge->get_last_out(ssgOut);
|
||||
for (int i=psgChanOffs; i<adpcmAChanOffs; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=ssgOut.data[i-psgChanOffs]<<1;
|
||||
oscBuf[i]->putSample(h,ssgOut.data[i-psgChanOffs]<<1);
|
||||
}
|
||||
|
||||
for (int i=adpcmAChanOffs; i<adpcmBChanOffs; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=(adpcmAChan[i-adpcmAChanOffs]->get_last_out(0)+adpcmAChan[i-adpcmAChanOffs]->get_last_out(1))>>1;
|
||||
oscBuf[i]->putSample(h,(adpcmAChan[i-adpcmAChanOffs]->get_last_out(0)+adpcmAChan[i-adpcmAChanOffs]->get_last_out(1))>>1);
|
||||
}
|
||||
|
||||
oscBuf[adpcmBChanOffs]->data[oscBuf[adpcmBChanOffs]->needle++]=(abe->get_last_out(0)+abe->get_last_out(1))>>1;
|
||||
oscBuf[adpcmBChanOffs]->putSample(h,(abe->get_last_out(0)+abe->get_last_out(1))>>1);
|
||||
}
|
||||
|
||||
for (int i=0; i<17; i++) {
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -373,6 +381,10 @@ void DivPlatformYM2610::acquire_ymfm(short** buf, size_t len) {
|
|||
adpcmAChan[i]=aae->debug_channel(i);
|
||||
}
|
||||
|
||||
for (int i=0; i<17; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
}
|
||||
|
||||
for (size_t h=0; h<len; h++) {
|
||||
// AY -> OPN
|
||||
ay->runDAC();
|
||||
|
|
@ -416,19 +428,23 @@ void DivPlatformYM2610::acquire_ymfm(short** buf, size_t len) {
|
|||
|
||||
for (int i=0; i<(psgChanOffs-isCSM); i++) {
|
||||
int out=(fmChan[i]->debug_output(0)+fmChan[i]->debug_output(1))<<1;
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(out,-32768,32767);
|
||||
oscBuf[i]->putSample(h,CLAMP(out,-32768,32767));
|
||||
}
|
||||
|
||||
ssge->get_last_out(ssgOut);
|
||||
for (int i=psgChanOffs; i<adpcmAChanOffs; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=ssgOut.data[i-psgChanOffs]<<1;
|
||||
oscBuf[i]->putSample(h,ssgOut.data[i-psgChanOffs]<<1);
|
||||
}
|
||||
|
||||
for (int i=adpcmAChanOffs; i<adpcmBChanOffs; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=(adpcmAChan[i-adpcmAChanOffs]->get_last_out(0)+adpcmAChan[i-adpcmAChanOffs]->get_last_out(1))>>1;
|
||||
oscBuf[i]->putSample(h,(adpcmAChan[i-adpcmAChanOffs]->get_last_out(0)+adpcmAChan[i-adpcmAChanOffs]->get_last_out(1))>>1);
|
||||
}
|
||||
|
||||
oscBuf[adpcmBChanOffs]->data[oscBuf[adpcmBChanOffs]->needle++]=(abe->get_last_out(0)+abe->get_last_out(1))>>1;
|
||||
oscBuf[adpcmBChanOffs]->putSample(h,(abe->get_last_out(0)+abe->get_last_out(1))>>1);
|
||||
}
|
||||
|
||||
for (int i=0; i<17; i++) {
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -439,6 +455,10 @@ static const unsigned char subCycleMap[6]={
|
|||
void DivPlatformYM2610::acquire_lle(short** buf, size_t len) {
|
||||
thread_local int fmOut[6];
|
||||
|
||||
for (int i=0; i<17; i++) {
|
||||
oscBuf[i]->begin(len);
|
||||
}
|
||||
|
||||
for (size_t h=0; h<len; h++) {
|
||||
bool have0=false;
|
||||
bool have1=false;
|
||||
|
|
@ -588,20 +608,20 @@ void DivPlatformYM2610::acquire_lle(short** buf, size_t len) {
|
|||
for (int i=0; i<4; i++) {
|
||||
if (fmOut[i]<-32768) fmOut[i]=-32768;
|
||||
if (fmOut[i]>32767) fmOut[i]=32767;
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=fmOut[i];
|
||||
oscBuf[i]->putSample(h,fmOut[i]);
|
||||
}
|
||||
// SSG
|
||||
for (int i=0; i<3; i++) {
|
||||
oscBuf[i+4]->data[oscBuf[i+4]->needle++]=fm_lle.o_analog_ch[i]*32767;
|
||||
oscBuf[i+4]->putSample(h,fm_lle.o_analog_ch[i]*32767);
|
||||
}
|
||||
// RSS
|
||||
for (int i=0; i<6; i++) {
|
||||
if (rssOut[i]<-32768) rssOut[i]=-32768;
|
||||
if (rssOut[i]>32767) rssOut[i]=32767;
|
||||
oscBuf[7+i]->data[oscBuf[7+i]->needle++]=rssOut[i];
|
||||
oscBuf[7+i]->putSample(h,rssOut[i]);
|
||||
}
|
||||
// ADPCM
|
||||
oscBuf[13]->data[oscBuf[13]->needle++]=fm_lle.ac_ad_output;
|
||||
oscBuf[13]->putSample(h,fm_lle.ac_ad_output);
|
||||
|
||||
// DAC
|
||||
int accm1=(short)dacOut[1];
|
||||
|
|
@ -618,6 +638,10 @@ void DivPlatformYM2610::acquire_lle(short** buf, size_t len) {
|
|||
buf[0][h]=outL;
|
||||
buf[1][h]=outR;
|
||||
}
|
||||
|
||||
for (int i=0; i<17; i++) {
|
||||
oscBuf[i]->end(len);
|
||||
}
|
||||
}
|
||||
|
||||
void DivPlatformYM2610::tick(bool sysTick) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue