OPN/A/B: fix chan osc overflow
This commit is contained in:
parent
478c3ecb57
commit
cb63314f53
4 changed files with 12 additions and 8 deletions
|
|
@ -333,7 +333,7 @@ void DivPlatformYM2610::acquire_combo(short** buf, size_t len) {
|
|||
|
||||
|
||||
for (int i=0; i<psgChanOffs; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=fm_nuked.ch_out[bchOffs[i]]<<1;
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(fm_nuked.ch_out[bchOffs[i]]<<1,-32768,32767);
|
||||
}
|
||||
|
||||
ssge->get_last_out(ssgOut);
|
||||
|
|
@ -404,7 +404,8 @@ void DivPlatformYM2610::acquire_ymfm(short** buf, size_t len) {
|
|||
buf[1][h]=os[1];
|
||||
|
||||
for (int i=0; i<psgChanOffs; i++) {
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=(fmChan[i]->debug_output(0)+fmChan[i]->debug_output(1))<<1;
|
||||
int out=(fmChan[i]->debug_output(0)+fmChan[i]->debug_output(1))<<1;
|
||||
oscBuf[i]->data[oscBuf[i]->needle++]=CLAMP(out,-32768,32767);
|
||||
}
|
||||
|
||||
ssge->get_last_out(ssgOut);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue