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
|
|
@ -2140,6 +2140,11 @@ int DivPlatformOPL::mapVelocity(int ch, float vel) {
|
|||
return CLAMP(round(64.0-(56.0-log2(vel*127.0)*8.0)),0,63);
|
||||
}
|
||||
|
||||
float DivPlatformOPL::getGain(int ch, int vol) {
|
||||
if (vol==0) return 0;
|
||||
return 1.0/pow(10.0,(float)(63-vol)*0.75/20.0);
|
||||
}
|
||||
|
||||
unsigned char* DivPlatformOPL::getRegisterPool() {
|
||||
return regPool;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue