OPN/A/B: fix CSM when using ymfm

and now there's a crash
This commit is contained in:
tildearrow 2024-10-17 02:53:08 -05:00
parent 3164f311f5
commit a0f0c863c9
13 changed files with 37 additions and 43 deletions

View file

@ -21,7 +21,6 @@
#include "sound/ymfm/ymfm.h"
#include "../engine.h"
#include <string.h>
#include <math.h>
#define CHIP_FREQBASE fmFreqBase
#define CHIP_DIVIDER fmDivBase
@ -277,6 +276,7 @@ void DivPlatformYM2203::acquire_ymfm(short** buf, size_t len) {
}
fm->generate(&fmout);
iface.clock(24);
os=((fmout.data[0]*fmVol)>>8)+(((fmout.data[1]+fmout.data[2]+fmout.data[3])*ssgVol)>>8);
if (os<-32768) os=-32768;