implement getGain for a couple chips
the ones with log volume
This commit is contained in:
parent
b108156954
commit
b2223ccd0f
17 changed files with 65 additions and 1 deletions
|
|
@ -198,6 +198,19 @@ class DivPlatformOPN: public DivPlatformFMBase {
|
|||
if (ch>=psgChanOffs) return round(15.0*pow(vel,0.33));
|
||||
return DivPlatformFMBase::mapVelocity(ch,vel);
|
||||
}
|
||||
virtual float getGain(int ch, int vol) {
|
||||
if (vol==0) return 0;
|
||||
if (ch==csmChan) return 1;
|
||||
if (ch==adpcmBChanOffs) return (float)vol/255.0;
|
||||
if (ch>=adpcmAChanOffs) {
|
||||
return 1.0/pow(10.0,(float)(31-vol)*0.75/20.0);
|
||||
}
|
||||
if (ch>=psgChanOffs) {
|
||||
return 1.0/pow(10.0,(float)(15-vol)*1.5/20.0);
|
||||
}
|
||||
return DivPlatformFMBase::getGain(ch,vol);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue