mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 13:05:11 +00:00
ES5506: fix getPan
This commit is contained in:
parent
06ba12b270
commit
ad55e6f728
1 changed files with 5 additions and 1 deletions
|
@ -1057,7 +1057,11 @@ DivMacroInt* DivPlatformES5506::getChanMacroInt(int ch) {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned short DivPlatformES5506::getPan(int ch) {
|
unsigned short DivPlatformES5506::getPan(int ch) {
|
||||||
return ((chan[ch].lVol>>4)<<8)|(chan[ch].rVol>>4);
|
float expL=255.0f*pow(((float)(chan[ch].resLVol>>4))/4095.0f,4.0f);
|
||||||
|
float expR=255.0f*pow(((float)(chan[ch].resRVol>>4))/4095.0f,4.0f);
|
||||||
|
if (expL>255.0f) expL=255.0f;
|
||||||
|
if (expR>255.0f) expR=255.0f;
|
||||||
|
return (((unsigned int)expL)<<8)|((unsigned int)expR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivPlatformES5506::reset() {
|
void DivPlatformES5506::reset() {
|
||||||
|
|
Loading…
Reference in a new issue