Add SSG and FM/ADPCM volume mixer config for OPN/A/B
This commit is contained in:
parent
560ec19176
commit
96983e3d48
7 changed files with 79 additions and 14 deletions
|
|
@ -210,11 +210,12 @@ void DivPlatformYM2203::acquire_combo(short* bufL, short* bufR, size_t start, si
|
|||
);
|
||||
|
||||
os&=~3;
|
||||
os=(os*fmVol)/255;
|
||||
|
||||
// ymfm part
|
||||
fm->generate(&fmout);
|
||||
|
||||
os+=((fmout.data[1]+fmout.data[2]+fmout.data[3])>>1);
|
||||
os+=(((fmout.data[1]+fmout.data[2]+fmout.data[3])>>1)*ssgVol)/255;
|
||||
if (os<-32768) os=-32768;
|
||||
if (os>32767) os=32767;
|
||||
|
||||
|
|
@ -255,7 +256,7 @@ void DivPlatformYM2203::acquire_ymfm(short* bufL, short* bufR, size_t start, siz
|
|||
|
||||
fm->generate(&fmout);
|
||||
|
||||
os=fmout.data[0]+((fmout.data[1]+fmout.data[2]+fmout.data[3])>>1);
|
||||
os=((fmout.data[0]*fmVol)/255)+((((fmout.data[1]+fmout.data[2]+fmout.data[3])>>1)*ssgVol)/255);
|
||||
if (os<-32768) os=-32768;
|
||||
if (os>32767) os=32767;
|
||||
|
||||
|
|
@ -1042,6 +1043,8 @@ void DivPlatformYM2203::setFlags(const DivConfig& flags) {
|
|||
CHECK_CUSTOM_CLOCK;
|
||||
noExtMacros=flags.getBool("noExtMacros",false);
|
||||
fbAllOps=flags.getBool("fbAllOps",false);
|
||||
ssgVol=flags.getInt("ssgVol",255);
|
||||
fmVol=flags.getInt("fmVol",255);
|
||||
rate=fm->sample_rate(chipClock);
|
||||
for (int i=0; i<6; i++) {
|
||||
oscBuf[i]->rate=rate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue