default SSG vol is now 128

to eliminate one shift
This commit is contained in:
tildearrow 2023-02-05 04:57:09 -05:00
parent fcc5b6e5eb
commit fda333a76b
7 changed files with 21 additions and 21 deletions

View File

@ -174,7 +174,7 @@ class DivPlatformOPN: public DivPlatformFMBase {
ayDiv(a),
csmChan(cc),
lfoValue(0),
ssgVol(256),
ssgVol(128),
fmVol(256),
extSys(isExtSys),
useCombo(false),

View File

@ -215,7 +215,7 @@ void DivPlatformYM2203::acquire_combo(short** buf, size_t len) {
// ymfm part
fm->generate(&fmout);
os+=(((fmout.data[1]+fmout.data[2]+fmout.data[3])>>1)*ssgVol)>>8;
os+=((fmout.data[1]+fmout.data[2]+fmout.data[3])*ssgVol)>>8;
if (os<-32768) os=-32768;
if (os>32767) os=32767;
@ -256,7 +256,7 @@ void DivPlatformYM2203::acquire_ymfm(short** buf, size_t len) {
fm->generate(&fmout);
os=((fmout.data[0]*fmVol)>>8)+((((fmout.data[1]+fmout.data[2]+fmout.data[3])>>1)*ssgVol)>>8);
os=((fmout.data[0]*fmVol)>>8)+(((fmout.data[1]+fmout.data[2]+fmout.data[3])*ssgVol)>>8);
if (os<-32768) os=-32768;
if (os>32767) os=32767;
@ -1043,7 +1043,7 @@ void DivPlatformYM2203::setFlags(const DivConfig& flags) {
CHECK_CUSTOM_CLOCK;
noExtMacros=flags.getBool("noExtMacros",false);
fbAllOps=flags.getBool("fbAllOps",false);
ssgVol=flags.getInt("ssgVol",256);
ssgVol=flags.getInt("ssgVol",128);
fmVol=flags.getInt("fmVol",256);
rate=fm->sample_rate(chipClock);
for (int i=0; i<6; i++) {

View File

@ -380,11 +380,11 @@ void DivPlatformYM2608::acquire_combo(short** buf, size_t len) {
// ymfm part
fm->generate(&fmout);
os[0]+=((fmout.data[0]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[0]+=((fmout.data[0]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[0]<-32768) os[0]=-32768;
if (os[0]>32767) os[0]=32767;
os[1]+=((fmout.data[1]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[1]+=((fmout.data[1]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[1]<-32768) os[1]=-32768;
if (os[1]>32767) os[1]=32767;
@ -441,11 +441,11 @@ void DivPlatformYM2608::acquire_ymfm(short** buf, size_t len) {
fm->generate(&fmout);
os[0]=((fmout.data[0]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[0]=((fmout.data[0]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[0]<-32768) os[0]=-32768;
if (os[0]>32767) os[0]=32767;
os[1]=((fmout.data[1]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[1]=((fmout.data[1]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[1]<-32768) os[1]=-32768;
if (os[1]>32767) os[1]=32767;
@ -1552,7 +1552,7 @@ void DivPlatformYM2608::setFlags(const DivConfig& flags) {
CHECK_CUSTOM_CLOCK;
noExtMacros=flags.getBool("noExtMacros",false);
fbAllOps=flags.getBool("fbAllOps",false);
ssgVol=flags.getInt("ssgVol",256);
ssgVol=flags.getInt("ssgVol",128);
fmVol=flags.getInt("fmVol",256);
rate=fm->sample_rate(chipClock);
for (int i=0; i<16; i++) {

View File

@ -311,11 +311,11 @@ void DivPlatformYM2610::acquire_combo(short** buf, size_t len) {
// ymfm part
fm->generate(&fmout);
os[0]+=((fmout.data[0]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[0]+=((fmout.data[0]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[0]<-32768) os[0]=-32768;
if (os[0]>32767) os[0]=32767;
os[1]+=((fmout.data[1]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[1]+=((fmout.data[1]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[1]<-32768) os[1]=-32768;
if (os[1]>32767) os[1]=32767;
@ -374,11 +374,11 @@ void DivPlatformYM2610::acquire_ymfm(short** buf, size_t len) {
fm->generate(&fmout);
os[0]+=((fmout.data[0]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[0]+=((fmout.data[0]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[0]<-32768) os[0]=-32768;
if (os[0]>32767) os[0]=32767;
os[1]+=((fmout.data[1]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[1]+=((fmout.data[1]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[1]<-32768) os[1]=-32768;
if (os[1]>32767) os[1]=32767;

View File

@ -379,11 +379,11 @@ void DivPlatformYM2610B::acquire_combo(short** buf, size_t len) {
// ymfm part
fm->generate(&fmout);
os[0]+=((fmout.data[0]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[0]+=((fmout.data[0]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[0]<-32768) os[0]=-32768;
if (os[0]>32767) os[0]=32767;
os[1]+=((fmout.data[1]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[1]+=((fmout.data[1]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[1]<-32768) os[1]=-32768;
if (os[1]>32767) os[1]=32767;
@ -440,11 +440,11 @@ void DivPlatformYM2610B::acquire_ymfm(short** buf, size_t len) {
fm->generate(&fmout);
os[0]+=((fmout.data[0]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[0]+=((fmout.data[0]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[0]<-32768) os[0]=-32768;
if (os[0]>32767) os[0]=32767;
os[1]+=((fmout.data[1]*fmVol)>>8)+(((fmout.data[2]>>1)*ssgVol)>>8);
os[1]+=((fmout.data[1]*fmVol)>>8)+((fmout.data[2]*ssgVol)>>8);
if (os[1]<-32768) os[1]=-32768;
if (os[1]>32767) os[1]=32767;

View File

@ -222,7 +222,7 @@ class DivPlatformYM2610Base: public DivPlatformOPN {
CHECK_CUSTOM_CLOCK;
noExtMacros=flags.getBool("noExtMacros",false);
fbAllOps=flags.getBool("fbAllOps",false);
ssgVol=flags.getInt("ssgVol",256);
ssgVol=flags.getInt("ssgVol",128);
fmVol=flags.getInt("fmVol",256);
rate=fm->sample_rate(chipClock);
for (int i=0; i<16; i++) {

View File

@ -472,7 +472,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int clockSel=flags.getInt("clockSel",0);
bool noExtMacros=flags.getBool("noExtMacros",false);
bool fbAllOps=flags.getBool("fbAllOps",false);
int ssgVol=flags.getInt("ssgVol",256);
int ssgVol=flags.getInt("ssgVol",128);
int fmVol=flags.getInt("fmVol",256);
if (ImGui::RadioButton("8MHz (Neo Geo MVS)",clockSel==0)) {
@ -870,7 +870,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int prescale=flags.getInt("prescale",0);
bool noExtMacros=flags.getBool("noExtMacros",false);
bool fbAllOps=flags.getBool("fbAllOps",false);
int ssgVol=flags.getInt("ssgVol",256);
int ssgVol=flags.getInt("ssgVol",128);
int fmVol=flags.getInt("fmVol",256);
ImGui::Text("Clock rate:");
@ -952,7 +952,7 @@ bool FurnaceGUI::drawSysConf(int chan, DivSystem type, DivConfig& flags, bool mo
int prescale=flags.getInt("prescale",0);
bool noExtMacros=flags.getBool("noExtMacros",false);
bool fbAllOps=flags.getBool("fbAllOps",false);
int ssgVol=flags.getInt("ssgVol",256);
int ssgVol=flags.getInt("ssgVol",128);
int fmVol=flags.getInt("fmVol",256);
ImGui::Text("Clock rate:");