|
@@ -2055,10 +2055,14 @@ cmRC_t cmXfaderExec( cmXfader* p, unsigned procSmpCnt, const bool* chGateV,
|
2055
|
2055
|
cmReal_t g = cp->gain;
|
2056
|
2056
|
|
2057
|
2057
|
if( cp->gateFl )
|
|
2058
|
+ {
|
2058
|
2059
|
cp->gain = cmMin(cp->gain + i_dgain,1.0);
|
|
2060
|
+ cp->ep_gain = sqrt(0.5 + 0.5 * cos(3.14159*cp->gain));
|
|
2061
|
+ }
|
2059
|
2062
|
else
|
2060
|
2063
|
{
|
2061
|
2064
|
cp->gain = cmMax(cp->gain - o_dgain,0.0);
|
|
2065
|
+ cp->ep_gain = sqrt(0.5 - 0.5 * cos(3.14159*cp->gain));
|
2062
|
2066
|
cp->offFl = g>0.0 && cp->gain==0.0; // notice fade-out transition end
|
2063
|
2067
|
}
|
2064
|
2068
|
|
|
@@ -2094,7 +2098,7 @@ cmRC_t cmXfaderExecAudio( cmXfader* p, unsigned procSmpCnt, const bool* gateV
|
2094
|
2098
|
unsigned i;
|
2095
|
2099
|
for(i=0; i<chCnt; ++i)
|
2096
|
2100
|
if( x[i] != NULL )
|
2097
|
|
- cmVOS_MultVaVS(y,procSmpCnt,x[i],p->chArray[i].gain);
|
|
2101
|
+ cmVOS_MultVaVS(y,procSmpCnt,x[i],p->chArray[i].ep_gain);
|
2098
|
2102
|
|
2099
|
2103
|
return rc;
|
2100
|
2104
|
}
|