mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Ignore relative volume adjustment, as criware seems to only pass it on to the user of the library.
This commit is contained in:
parent
4c75e6a5bc
commit
e67642db30
@ -740,7 +740,7 @@ int clHCA_DecodeToWavefile_Decode(clHCA *hca,void *fp1,void *fp2,unsigned int ad
|
|||||||
for(i=0;i<8;i++){
|
for(i=0;i<8;i++){
|
||||||
for(j=0;j<0x80;j++){
|
for(j=0;j<0x80;j++){
|
||||||
for(k=0,m=hca->_channelCount;k<m;k++){
|
for(k=0,m=hca->_channelCount;k<m;k++){
|
||||||
f=_channel[k].wave[i][j]*_rva_volume;
|
f=_channel[k].wave[i][j]*hca->_rva_volume;
|
||||||
if(f>1){f=1;}else if(f<-1){f=-1;}
|
if(f>1){f=1;}else if(f<-1){f=-1;}
|
||||||
((void (*)(float,void *))modeFunction)(f,fp2);
|
((void (*)(float,void *))modeFunction)(f,fp2);
|
||||||
}
|
}
|
||||||
@ -793,11 +793,11 @@ void clHCA_DecodeSamples16(clHCA *hca,signed short *samples){
|
|||||||
const float scale = 32768.0f;
|
const float scale = 32768.0f;
|
||||||
float f;
|
float f;
|
||||||
signed int s;
|
signed int s;
|
||||||
const float _rva_volume=hca->_rva_volume;
|
//const float _rva_volume=hca->_rva_volume;
|
||||||
for(int i=0;i<8;i++){
|
for(int i=0;i<8;i++){
|
||||||
for(int j=0;j<0x80;j++){
|
for(int j=0;j<0x80;j++){
|
||||||
for(unsigned int k=0,l=hca->_channelCount;k<l;k++){
|
for(unsigned int k=0,l=hca->_channelCount;k<l;k++){
|
||||||
f=hca->_channel[k].wave[i][j]*_rva_volume;
|
f=hca->_channel[k].wave[i][j]/**_rva_volume*/;
|
||||||
if(f>1){f=1;}else if(f<-1){f=-1;}
|
if(f>1){f=1;}else if(f<-1){f=-1;}
|
||||||
s=(signed int)(f*scale);
|
s=(signed int)(f*scale);
|
||||||
if ((unsigned)(s+0x8000)&0xFFFF0000)s=(s>>31)^0x7FFF;
|
if ((unsigned)(s+0x8000)&0xFFFF0000)s=(s>>31)^0x7FFF;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user